Skip to content

Commit

Permalink
fix: skip leading 'v' in docker tag
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonSzyszkowski committed Jan 20, 2025
1 parent 8e3c765 commit 599bdf6
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: "Docker auth"
run: |-
run: |
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Quick Docker build (gentropy only, AMD64 only, with layer cache)
Expand All @@ -50,22 +50,31 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push gentropy image
# skip the `v` at the beginning of the tag for docker image tags
- name: Create a docker version tag
id: docker-tag
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
uses: actions/github-script@v7
with:
script: |
return github.ref_name.replace('v', '');
- name: Build and push gentropy image
if: steps.docker-tag.outcome == 'success'
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/gentropy:${{ github.ref_name }}"
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/gentropy:${{ steps.docker-tag.outputs.result }}"
context: .

- name: Build and push VEP image
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
if: steps.docker-tag.outcome == 'success'
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/custom_ensembl_vep:${{ github.ref_name }}"
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/custom_ensembl_vep:${{ steps.docker-tag.outputs.result }}"
context: .
file: "src/vep/Dockerfile"

Expand Down

0 comments on commit 599bdf6

Please sign in to comment.