From efdf790bb1ae7012bb91f3c899fa167e6d4cf6a4 Mon Sep 17 00:00:00 2001 From: Mike Glenn <219478+ilude@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:32:56 -0400 Subject: [PATCH] more tweaks to workflow --- .github/workflows/docker-publish.yml | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index aacc332..4d0e377 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -46,20 +46,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # list of Docker images to use as base name for tags - images: | - ghcr.io/${{ github.repository }} - # generate Docker tags based on the following events/attributes - tags: | - type=ref,event=branch - type=ref,event=pr - type=raw,value=latest,enable={{is_default_branch}} - type=sha - # Set up BuildKit Docker container builder to be able to build # multi-platform images and export cache # https://github.com/docker/setup-buildx-action @@ -76,6 +62,20 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + ghcr.io/${{ github.repository }} + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=ref,event=pr + type=raw,value=latest,enable={{is_default_branch}} + type=sha + # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image @@ -99,7 +99,7 @@ jobs: username: MafenBot color: '#ff00aa' avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png - description: A new ${{ github.event.repository.name }} image ghcr.io/${{ github.repository }}:latest has been published + description: A new ${{ github.event.repository.name }} image ${{ steps.meta.outputs.tags }} has been published details: Based on ${{ github.event.head_commit.url }} footer: MafenBot became self aware webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}