diff --git a/.github/workflows/docker-publish-develop.yml b/.github/workflows/docker-publish-develop.yml index d7bc5e7..44e8ffa 100644 --- a/.github/workflows/docker-publish-develop.yml +++ b/.github/workflows/docker-publish-develop.yml @@ -6,18 +6,15 @@ name: Docker # documentation. on: - schedule: - - cron: '33 8 * * *' push: branches: [ "develop" ] - # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: branches: [ "develop" ] env: # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io + GITHUB_REGISTRY: ghcr.io DOCKER_REGISTRY: docker.io # github.repository as / IMAGE_NAME: ${{ github.repository }} @@ -52,11 +49,11 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} + - name: Log into registry ${{ env.GITHUB_REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GITHUB_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -66,7 +63,7 @@ jobs: id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=develop type=ref,event=tag @@ -77,8 +74,6 @@ jobs: id: build-and-push uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: - context: . - file: ./Dockerfile.develop push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -101,8 +96,8 @@ jobs: - name: Log into registry ${{ env.DOCKER_REGISTRY }} uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: docker_meta diff --git a/.github/workflows/docker-publish-master.yml b/.github/workflows/docker-publish-master.yml index bf9355a..b917211 100644 --- a/.github/workflows/docker-publish-master.yml +++ b/.github/workflows/docker-publish-master.yml @@ -6,18 +6,15 @@ name: Docker # documentation. on: - schedule: - - cron: '33 8 * * *' push: branches: [ "master" ] - # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: branches: [ "master" ] env: # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io + GITHUB_REGISTRY: ghcr.io DOCKER_REGISTRY: docker.io # github.repository as / IMAGE_NAME: ${{ github.repository }} @@ -52,11 +49,11 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} + - name: Log into registry ${{ env.GITHUB_REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GITHUB_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -66,7 +63,7 @@ jobs: id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=production type=ref,event=tag @@ -77,8 +74,6 @@ jobs: id: build-and-push uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: - context: . - file: ./Dockerfile.production push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -101,8 +96,8 @@ jobs: - name: Log into registry ${{ env.DOCKER_REGISTRY }} uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: docker_meta