Skip to content

Commit

Permalink
more tweaks to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Apr 17, 2024
1 parent dc19d42 commit efdf790
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit efdf790

Please sign in to comment.