Skip to content

fix ghcr login in workflows #17

fix ghcr login in workflows

fix ghcr login in workflows #17

Workflow file for this run

name: Docker Nightly
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- main
- master
env:
IMAGE_NAME: enoarkime
jobs:
# Push image to GitHub Packages.
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image to GitHub Container Registry
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:nightly
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker image build -t $IMAGE_ID .
docker image push $IMAGE_ID