Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Nov 20, 2024
1 parent 5187569 commit effb984
Showing 1 changed file with 50 additions and 13 deletions.
63 changes: 50 additions & 13 deletions .github/workflows/build_push_stata_user_licensed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,53 @@ on:
workflow_dispatch:

jobs:
stata_user-licensed:
name: Build and Push user licensed Stata workspace image
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
with:
DOCKERFILE_LOCATION: "./jupyter-pystata-user-licensed/Dockerfile"
DOCKERFILE_BUILD_CONTEXT: "./jupyter-pystata-user-licensed"
OVERRIDE_REPO_NAME: "jupyter-pystata-user-licensed"
OVERRIDE_TAG_NAME: "jupyter-pystata-user-licensed-$(echo ${GITHUB_REF#refs/*/} | tr / _)"
secrets:
ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
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@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/Stata17Linux64.tar.gz'
dest: './jupyter-pystata-user-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-user-licensed:${{ env.IMAGE_TAG }}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
context: ./jupyter-pystata-user-licensed"
file: "./jupyter-pystata-user-licensed/Dockerfile"
push: true
tags: |
quay.io/cdis/jupyter-pystata-user-licensed:${{ env.IMAGE_TAG }}
labels: ${{ steps.meta.outputs.labels }}
platforms: "linux/amd64, linux/arm64"

0 comments on commit effb984

Please sign in to comment.