Skip to content

Commit

Permalink
Use reusable deploy image
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Nov 15, 2024
1 parent d7f8b3b commit eac7309
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,9 @@ jobs:
- name: code coverage
run: bash <(curl -s https://codecov.io/bash)

- if: github.ref == 'refs/heads/develop'
name: Set S3 folder name and quay tag name
run: |
S3_FOLDER=${GITHUB_REF##refs/tags/}
if [ $GITHUB_REF == $S3_FOLDER ]; then
# If this isn't a tag, it must be a branch
S3_FOLDER=${GITHUB_REF##refs/heads/}
fi
# QUAY_TAG differs from S3_FOLDER because it only contains the git ref with no short hash. It also replaces slashes with underscores.
echo "QUAY_TAG=${S3_FOLDER//\//_}" >> $GITHUB_ENV
echo "S3_FOLDER=${S3_FOLDER}-$(echo $GITHUB_SHA | cut -c -7)" >> $GITHUB_ENV
# neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml
- if: github.ref == 'refs/heads/develop'
name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

- if: github.ref == 'refs/heads/develop'
name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: quay.io/dockstore/dockstore-support:${{env.QUAY_TAG}}
deploy_image:
uses: dockstore/workflow-actions/.github/workflows/deploy_image.yaml@seab-6771/reusable-image-deploy
# if: github.ref == 'refs/heads/develop'
with:
quayRepository: dockstore-bootstrap
secrets: inherit

0 comments on commit eac7309

Please sign in to comment.