-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix inputs in github workflows (#1719)
- Loading branch information
1 parent
84e7174
commit 7644c67
Showing
2 changed files
with
21 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,16 +43,6 @@ on: | |
required: true | ||
SLACK_RELEASE_CHANNEL_ID: | ||
required: true | ||
|
||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Which environment to deploy the sanity suite | ||
required: true | ||
options: | ||
- production | ||
- staging | ||
|
||
permissions: | ||
id-token: write # allows the JWT to be requested from GitHub's OIDC provider | ||
|
@@ -152,7 +142,7 @@ jobs: | |
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'Sanity suite - ${{ github.event.inputs.environment }}' | ||
PROJECT_NAME: 'Sanity suite - ${{ inputs.environment }}' | ||
CDN_URL: 'https://cdn.rudderlabs.com/sanity-suite/${{ env.SUITE_CDN_PATH }}/v3/cdn/' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,25 +84,25 @@ jobs: | |
env: | ||
HUSKY: 0 | ||
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: ${{ github.event.inputs.bugsnag_release_stage }} | ||
BUGSNAG_RELEASE_STAGE: ${{ inputs.bugsnag_release_stage }} | ||
run: | | ||
npm run setup:ci | ||
- name: Build release artifacts | ||
env: | ||
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: ${{ github.event.inputs.bugsnag_release_stage }} | ||
BUGSNAG_RELEASE_STAGE: ${{ inputs.bugsnag_release_stage }} | ||
run: | | ||
npm run build:browser | ||
npm run build:browser:modern | ||
- name: Sync Adobe Analytics assets to S3 | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
aws s3 cp assets/integrations/AdobeAnalytics/ s3://${{ secrets.AWS_S3_BUCKET_NAME }}/adobe-analytics-js --recursive --cache-control max-age=$${{ env.CACHE_MAX_AGE }} | ||
- name: Create Cloudfront invalidation | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/adobe-analytics-js*" | ||
|
@@ -111,7 +111,7 @@ jobs: | |
core_sdk_path_prefix="packages/analytics-js/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
plugins_path_prefix="packages/analytics-js-plugins/dist/cdn" | ||
s3_path_prefix="s3://${{ secrets.AWS_S3_BUCKET_NAME }}/${{ github.event.inputs.s3_dir_path }}" | ||
s3_path_prefix="s3://${{ secrets.AWS_S3_BUCKET_NAME }}/${{ inputs.s3_dir_path }}" | ||
copy_args="--recursive --cache-control max-age=${{ env.CACHE_MAX_AGE }}" | ||
aws s3 cp $core_sdk_path_prefix/legacy/iife/ $s3_path_prefix/legacy/ $copy_args | ||
|
@@ -123,10 +123,10 @@ jobs: | |
- name: Create Cloudfront invalidation | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.inputs.s3_dir_path }}/*" | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ inputs.s3_dir_path }}/*" | ||
- name: Sync files to S3 versioned directory | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
core_sdk_path_prefix="packages/analytics-js/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
|
@@ -142,13 +142,13 @@ jobs: | |
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args | ||
- name: Create Cloudfront invalidation | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ env.CURRENT_VERSION_VALUE }}/*" | ||
# TODO: The '/latest' directory is unused. Might be removed in future. | ||
- name: Sync files to S3 latest | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
core_sdk_path_prefix="packages/analytics-js/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
|
@@ -164,7 +164,7 @@ jobs: | |
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args | ||
- name: Create Cloudfront invalidation | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/latest*" | ||
|
@@ -173,8 +173,8 @@ jobs: | |
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'JS SDK v3 Browser Package${{ github.event.inputs.action_type }} - ${{ github.event.inputs.environment }}' | ||
CDN_URL: 'https://cdn.rudderlabs.com/${{ github.event.inputs.s3_dir_path }}/modern/rsa.min.js' | ||
PROJECT_NAME: 'JS SDK v3 Browser Package${{ inputs.action_type }} - ${{ inputs.environment }}' | ||
CDN_URL: 'https://cdn.rudderlabs.com/${{ inputs.s3_dir_path }}/modern/rsa.min.js' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
payload: | | ||
|
@@ -207,7 +207,7 @@ jobs: | |
run: | | ||
core_sdk_path_prefix="packages/analytics-v1.1/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
s3_path_prefix="s3://${{ secrets.AWS_S3_BUCKET_NAME }}/${{ github.event.inputs.s3_dir_path_legacy }}" | ||
s3_path_prefix="s3://${{ secrets.AWS_S3_BUCKET_NAME }}/${{ inputs.s3_dir_path_legacy }}" | ||
copy_args="--recursive --cache-control max-age=${{ env.CACHE_MAX_AGE }}" | ||
aws s3 cp $core_sdk_path_prefix/legacy/ $s3_path_prefix/ $copy_args | ||
|
@@ -218,10 +218,10 @@ jobs: | |
- name: Create Cloudfront invalidation | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.inputs.s3_dir_path_legacy }}*" | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ inputs.s3_dir_path_legacy }}*" | ||
- name: Sync files to S3 v1.1 versioned directory | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
core_sdk_path_prefix="packages/analytics-v1.1/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
|
@@ -235,12 +235,12 @@ jobs: | |
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args | ||
- name: Create Cloudfront invalidation | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ env.CURRENT_VERSION_V1_VALUE }}*" | ||
- name: Sync files to S3 latest (v1.1) | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
core_sdk_path_prefix="packages/analytics-v1.1/dist/cdn" | ||
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn" | ||
|
@@ -254,7 +254,7 @@ jobs: | |
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args | ||
- name: Create Cloudfront invalidation | ||
if: ${{ github.event.inputs.environment }} == 'production' | ||
if: ${{ inputs.environment }} == 'production' | ||
run: | | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/latest*" | ||
|
@@ -263,8 +263,8 @@ jobs: | |
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'JS SDK v1.1 Browser Package${{ github.event.inputs.action_type }} - ${{ github.event.inputs.environment }}' | ||
CDN_URL: 'https://cdn.rudderlabs.com/${{ github.event.inputs.s3_dir_path }}/rudder-analytics.min.js' | ||
PROJECT_NAME: 'JS SDK v1.1 Browser Package${{ inputs.action_type }} - ${{ inputs.environment }}' | ||
CDN_URL: 'https://cdn.rudderlabs.com/${{ inputs.s3_dir_path }}/rudder-analytics.min.js' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
payload: | | ||
|