Skip to content

Commit

Permalink
Teach tag release about the CLI (#309)
Browse files Browse the repository at this point in the history
Same as #308 #307 just for tags. Planning or releasing the next patch
release!
  • Loading branch information
mkysel authored Dec 6, 2024
1 parent e3ac999 commit 82f38f2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
push_to_registry:
name: Push Docker Image to GitHub Packages
strategy:
matrix:
image: [ "xmtpd", "xmtpd-cli" ]
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -23,12 +26,22 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker image file based on the matrix variable
id: set_dockerfile
run: |
if [[ "${{ matrix.image }}" == "xmtpd" ]]; then
echo "dockerfile=Dockerfile" >> $GITHUB_OUTPUT
elif [[ "${{ matrix.image }}" == "xmtpd-cli" ]]; then
echo "dockerfile=Dockerfile-cli" >> $GITHUB_OUTPUT
else
echo "Unknown image: ${{ matrix.image }}"
exit 1
fi
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/xmtp/xmtpd
images: ghcr.io/xmtp/${{ matrix.image }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
Expand All @@ -38,7 +51,7 @@ jobs:
id: push
with:
context: .
file: ./dev/docker/Dockerfile
file: ./dev/docker/${{ steps.set_dockerfile.outputs.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 82f38f2

Please sign in to comment.