Skip to content

Commit

Permalink
Fix for the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dodancs committed Jul 22, 2024
1 parent 9cc1ee0 commit f263d4e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}


- name: Fetch release version of ProfitTrailer
id: remote-check
run: |
echo ::set-output name=remote_tag_ver::$(curl -s -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/repos/taniman/profit-trailer/releases' | jq -r '.[0].tag_name')
- name: Check if we already have this version
id: local-check
run: |
echo ::set-output name=exists::$([ -z "`git tag -l | grep ^${{ steps.remote-check.outputs.remote_tag_ver }}$`" ] && echo "false" || echo "true")
- name: Tag latest release version
if: steps.local-check.outputs.exists == 'false'
run: |
Expand All @@ -48,7 +46,7 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push the Docker images
run: |
docker push dodancs/profit-trailer:${{ steps.remote-check.outputs.remote_tag_ver }}
Expand Down

0 comments on commit f263d4e

Please sign in to comment.