From 617190032cb13e2202b35c8a2588785d748977ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Taveira=20Ara=C3=BAjo?= Date: Thu, 6 Jun 2024 10:40:26 -0700 Subject: [PATCH] fix: version metric filters Package metric filters as part of release. This has the advantage of removing the single purpose workflow and ensuring users can rollback to a previous definition if necessary. --- .github/workflows/static-upload.yaml | 60 ---------------------------- Makefile | 1 + 2 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 .github/workflows/static-upload.yaml diff --git a/.github/workflows/static-upload.yaml b/.github/workflows/static-upload.yaml deleted file mode 100644 index dffab07b..00000000 --- a/.github/workflows/static-upload.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Upload static assets - -on: - workflow_dispatch: - inputs: - version: - description: 'Version metadata tag to attach to S3 object' - default: '' - required: false - type: string - workflow_call: - inputs: - version: - description: 'Version metadata tag to attach to S3 object' - default: '' - required: false - type: string - -env: - S3_BUCKET_PREFIX: observeinc - -jobs: - permission_check: - runs-on: ubuntu-latest - outputs: - can-write: ${{ steps.check.outputs.can-write }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - steps: - - id: check - run: | - # If the AWS_ACCESS_KEY_ID secret is MIA we can't run tests - if [[ -z "$AWS_ACCESS_KEY_ID" ]]; then - echo "can-write=false" >> $GITHUB_OUTPUT - else - echo "can-write=true" >> $GITHUB_OUTPUT - fi - - sync: - runs-on: ubuntu-latest - needs: [permission_check] - permissions: - id-token: write - steps: - - name: Setup AWS credentials - uses: aws-actions/configure-aws-credentials@v4.0.2 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ARN }} - aws-region: us-west-2 - - - name: AWS Info - run: aws sts get-caller-identity - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Sync - run: make static-upload - env: - VERSION: ${{ inputs.version }} diff --git a/Makefile b/Makefile index 73182ce0..fffebf2d 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,7 @@ $(foreach template,$(SAM_PACKAGE_TEMPLATES),$(eval \ $(SAM_PACKAGE_DIRS): mkdir -p $@ + cp -r static/ $@ $(SAM_PACKAGE_TEMPLATES): | $(SAM_PACKAGE_DIRS) ifeq ($(S3_BUCKET_PREFIX),)