Skip to content

Include branch name in zip file name #2

Include branch name in zip file name

Include branch name in zip file name #2

name: Sync with container templates S3 bucket
on:
push:
branches:
- main
- t6-378
env:
repo_name: ${{ github.event.repository.name }}
branch_name: ${{ github.head_ref || github.ref_name }}
zip_file_name: ${{ env.repo_name }}-${{ env.branch_name }}.zip

Check failure on line 12 in .github/workflows/sync_with_container_templates_bucket.yml

View workflow run for this annotation

GitHub Actions / Sync with container templates S3 bucket

Invalid workflow file

The workflow is not valid. .github/workflows/sync_with_container_templates_bucket.yml (Line: 12, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.repo_name

Check failure on line 12 in .github/workflows/sync_with_container_templates_bucket.yml

View workflow run for this annotation

GitHub Actions / Sync with container templates S3 bucket

Invalid workflow file

The workflow is not valid. .github/workflows/sync_with_container_templates_bucket.yml (Line: 12, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.repo_name
jobs:
upload-templates:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODE_TEMPLATE_TO_S3_IAM_ROLE }}
aws-region: us-east-1
- name: Checkout
uses: actions/checkout@v3
- name: Zip code into template
run: |
zip * -r ${{ env.zip_file_name }}
- name: Upload template to s3
run: |
aws s3 cp editor-component.yaml s3://container-code-templates/${{ env.zip_file_name }} --acl public-read