longer pause #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Stata Gen3-licensed Image to quay | |
on: | |
push: | |
paths: | |
- jupyter-pystata-gen3-licensed/** | |
- .github/workflows/build_push_stata_gen3_licensed.yml | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 30000 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- uses: actions/checkout@v2 | |
- uses: prewk/[email protected] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
SOURCE: 's3://ctds-stata/StataNow18Linux64.tar.gz' | |
DEST: './jupyter-pystata-gen3-licensed/resources/' | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=$(echo $(echo ${GITHUB_REF#refs/*/} | tr / _))" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Determine image to build | |
id: parse_image | |
shell: python | |
run: | | |
import os | |
build_target = "jupyter-pystata-licensed" | |
print(f"Will trigger build for: {build_target}") | |
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: | |
print(f'build_target={build_target}', file=fh) | |
- if: ${{ steps.parse_image.outputs.build_target }} | |
name: Sanitize image name | |
id: sanitize_name | |
run: | | |
IMAGE_NAME=$( sed 's/[^[:alnum:]]/_/g' <<< ${{ steps.parse_image.outputs.build_target }} ); | |
echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: jupyter-pystata-gen3-licensed | |
tags: ${{ steps.extract_branch.outputs.branch }} | |
dockerfiles: ./jupyter-pystata-gen3-licensed/Dockerfile | |
- name: Push To quay.io | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/cdis | |
username: ${{ secrets.QUAY_SERVICE_ACCOUNT_USER }} | |
password: ${{ secrets.QUAY_SERVICE_ACCOUNT_PASSWORD }} |