fix(fix-file-input-and-sql-cell): Updated the file input to work properly when cleared, cancelled and upd ated the sql cell to work properly with variables in query #427
Workflow file for this run
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: Build and Push Images | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
release: | |
types: [created] | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
name: Build Launch Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: "yarn" | |
cache-dependency-path: "zt_frontend/yarn.lock" | |
- name: Build Frontend Files | |
run: | | |
echo "Cleaning up old builds..." | |
rm -rf zt_backend/dist_dev/ zt_backend/dist_app/ | |
echo "Building Frontend..." | |
(cd zt_frontend && yarn install && yarn build && cp -r dist/ ../zt_backend/dist_dev/) | |
(cd zt_frontend && yarn buildapp && cp -r dist/ ../zt_backend/dist_app/) | |
(cd copilot && yarn install) | |
shell: bash | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ARN }} | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: "Build and push image via Kaniko" | |
if: github.ref_type == 'tag' | |
run: | | |
docker run \ | |
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ | |
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ | |
-e AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \ | |
-v ${{ github.workspace }}:/workspace \ | |
gcr.io/kaniko-project/executor:latest \ | |
--dockerfile Dockerfile \ | |
--reproducible --cleanup --cache=true \ | |
--cache-repo ${{ secrets.ECR_REGISTRY }}/${{ secrets.ECR_REPOSITORY }}-cache \ | |
--destination=${{ secrets.ECR_REGISTRY }}/${{ secrets.ECR_REPOSITORY }}:zero-true-${GITHUB_REF_NAME}-python${{ matrix.python-version }} \ | |
--context dir:///workspace/ \ | |
--build-arg PYTHON_VERSION=${{ matrix.python-version }} | |
- name: "Build and push image via Kaniko" | |
if: github.ref == 'refs/heads/main' | |
run: | | |
docker run \ | |
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ | |
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ | |
-e AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \ | |
-v ${{ github.workspace }}:/workspace \ | |
gcr.io/kaniko-project/executor:latest \ | |
--dockerfile Dockerfile \ | |
--reproducible --cleanup --cache=true \ | |
--cache-repo ${{ secrets.ECR_REGISTRY }}/${{ secrets.ECR_REPOSITORY }}-cache \ | |
--destination=${{ secrets.ECR_REGISTRY }}/${{ secrets.ECR_REPOSITORY }}:zero-true-v${{ github.sha }}-python${{ matrix.python-version }} \ | |
--context dir:///workspace/ \ | |
--build-arg PYTHON_VERSION=${{ matrix.python-version }} |