diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f50a211..0ca9df9 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,18 +1,17 @@ -name: Docker Image CI +name: Docker CI on: push: - branches: [ master ] + branches: + - master pull_request: - branches: [ master ] + branches: + - master jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag git-monitor:$(date +%s) + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag git-monitor:$(date +%s) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 6d6a29e..b976484 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,4 +1,4 @@ -name: Docker +name: Docker Publish on: push: @@ -10,9 +10,6 @@ on: tags: - v* - # Run tests for any PRs. - pull_request: - env: # TODO: Change variable to your image's name. IMAGE_NAME: git-monitor @@ -51,7 +48,6 @@ jobs: run: docker build . --file Dockerfile --tag $IMAGE_NAME - name: Log into GitHub Container Registry - # TODO: Create a PAT with `read:packages` and `write:packages` scopes and save it as an Actions secret `CR_PAT` run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin - name: Push image to GitHub Container Registry