Skip to content

Commit

Permalink
Added subversions
Browse files Browse the repository at this point in the history
  • Loading branch information
dodancs committed May 12, 2024
1 parent 64e187c commit 4fcd7c4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ jobs:
- name: Get current tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Get current tag
run: echo "RELEASE_VERSION_1=$(echo $RELEASE_VERSION | cut '.' -f1)" >> $GITHUB_ENV

- name: Get current tag
run: echo "RELEASE_VERSION_2=$(echo $RELEASE_VERSION | cut '.' -f1,2)" >> $GITHUB_ENV

- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag dodancs/pdns:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:${{ env.RELEASE_VERSION_1 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:${{ env.RELEASE_VERSION_2 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:latest
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_1 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_2 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:latest
- name: Log in to Docker Hub
Expand All @@ -39,6 +49,10 @@ jobs:
- name: Push the Docker images
run: |
docker push dodancs/pdns:${{ env.RELEASE_VERSION }}
docker push dodancs/pdns:${{ env.RELEASE_VERSION_1 }}
docker push dodancs/pdns:${{ env.RELEASE_VERSION_2 }}
docker push dodancs/pdns:latest
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION }}
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_1 }}
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_2 }}
docker push ghcr.io/dodancs/docker-pdns:latest

0 comments on commit 4fcd7c4

Please sign in to comment.