Skip to content

Commit

Permalink
feat: add image tags for version ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
lschloetterer authored Oct 16, 2023
1 parent b87fd79 commit 5f0329a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
uses: actions/checkout@v4
- name: Retrieve image version
run: echo "IMAGE_VERSION=$(head -1 Dockerfile | grep -oP '(?<=caddy:).*?(?=-builder)')" >> $GITHUB_ENV
- name: Parse version ranges
run: |
echo "IMAGE_VERSION_MAJOR=$(echo $IMAGE_VERSION | cut -d '.' -f 1)" >> $GITHUB_ENV
echo "IMAGE_VERSION_MAJOR_MINOR=$(echo $IMAGE_VERSION | cut -d '.' -f 1,2)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -41,4 +45,6 @@ jobs:
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION_MAJOR }}
${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION_MAJOR_MINOR }}
${{ env.IMAGE_NAME }}:latest

0 comments on commit 5f0329a

Please sign in to comment.