-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use reusable image deploy #510
base: develop
Are you sure you want to change the base?
Changes from 6 commits
eac7309
b473afc
ae8db5d
9b4c613
b4796d6
9b7f2f1
08c06c1
1b9c225
6ffea32
1a0369e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,32 +33,14 @@ 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 }} | ||
deploy_image: | ||
uses: dockstore/workflow-actions/.github/workflows/deploy_image.yaml@seab-6771/reusable-image-deploy | ||
if: ${{ github.ref == 'refs/heads/develop' || github.ref_type == 'tag' }} | ||
with: | ||
quayRepository: dockstore-support | ||
secrets: inherit | ||
|
||
- 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_tagged: | ||
if: github.ref_type == 'tag' | ||
uses: dockstore/workflow-actions/.github/workflows/deploy_tagged.yaml@seab-6771/reusable-image-deploy | ||
secrets: inherit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Little bit confused by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
They could arguably be combined (at least from the POV of this repo), but not all of our repositories require uploading the artifacts to artifactory, which is why I separated out There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good code comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably you'll change this to
main
after your other PR is merged?