Skip to content

Revert "add write permission to GITHUB_TOKEN" #19

Revert "add write permission to GITHUB_TOKEN"

Revert "add write permission to GITHUB_TOKEN" #19

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