Skip to content

Commit

Permalink
Merge pull request #2 from wickywaka/parse-semver
Browse files Browse the repository at this point in the history
Added semver parsing for easier future tagging
  • Loading branch information
wickywaka authored Jul 26, 2022
2 parents 5251b3a + ac94325 commit 484e79e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerize-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: networkboot/dhcpd:latest

- name: Image digest
- name: Print Image Digest
run: echo ${{ steps.docker_build.outputs.digest }}
20 changes: 8 additions & 12 deletions .github/workflows/dockerize-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ jobs:
with:
tagRegex: "v(.*)"

- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: $GIT_TAG_NAME
version_extractor_regex: '\/v(.*)$'
- name: Use parsed semver
run: |
echo "v${{ steps.semver_parser.outputs.fullversion }}"
- name: Parse Semver String
id: semver-parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: "${{ steps.get-tag.outputs.tag }}"

- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -41,13 +37,13 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }}
tags: networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }}

- name: Image digest
- name: Print Image Digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 484e79e

Please sign in to comment.