Merge pull request #208 from uc-cdis/mfshao-patch-1 #71
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: | |
- uses: actions/checkout@v4 | |
- uses: prewk/s3-cp-action@v2 | |
with: | |
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 | |
id: extract_branch | |
run: | | |
echo "IMAGE_TAG=$(echo ${GITHUB_REF#refs/*/} | tr / _)" | |
echo "IMAGE_TAG=$(echo ${GITHUB_REF#refs/*/} | tr / _)" >> $GITHUB_ENV | |
- name: Login to Quay.io | |
id: login | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
quay.io/cdis/jupyter-pystata-gen3-licensed:${{ env.IMAGE_TAG }} | |
- name: Build and Push Image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./jupyter-pystata-gen3-licensed | |
file: "./jupyter-pystata-gen3-licensed/Dockerfile" | |
push: true | |
tags: | | |
quay.io/cdis/jupyter-pystata-gen3-licensed:${{ env.IMAGE_TAG }} | |
labels: ${{ steps.meta.outputs.labels }} |