Skip to content

Commit

Permalink
try to use version in name
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Schwab committed Dec 1, 2024
1 parent bef8f2a commit df796c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jobs:
- uses: actions/checkout@v4
- name: build docker image latest
run: |
VERSION=$(cat VERSION | tr -d ' \t\n\r')
cd docker
docker build . -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest
- name: build docker image ${VERSION}
- name: determine version
run: |
VERSION=$(cat VERSION | tr -d ' \t\n\r')
echo "VERSION=${VERSION}" > $GITHUB_ENV
- name: build docker image ${VERSION}
run: |
cd docker
docker build . -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:${VERSION}
- name: Login to Docker Hub
Expand All @@ -38,7 +40,6 @@ jobs:
- name: push ${VERSION}
if: contains('refs/heads/main', github.ref)
run: |
VERSION=$(cat VERSION | tr -d ' \t\n\r')
docker push ${{ vars.DOCKER_HUB_USERNAME }}/backup:${VERSION}
env:
username: ${{ vars.DOCKER_HUB_USERNAME }}
Expand Down

0 comments on commit df796c2

Please sign in to comment.