From f997e8414703f00e3163b108ca9e89876d62055d Mon Sep 17 00:00:00 2001 From: Vivek Ayer Date: Fri, 5 Jan 2024 16:23:40 -0800 Subject: [PATCH 1/2] fix: conventional-commits: handle dependabot hyphen (#1) (#235) - changing regex from [a-z] to [a-z-] - resolves https://github.com/chanzuckerberg/github-actions/issues/234 Co-authored-by: Jake Heath <76011913+jakeyheath@users.noreply.github.com> --- .github/actions/conventional-commits/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/conventional-commits/action.yml b/.github/actions/conventional-commits/action.yml index 53b82f86..319d57df 100644 --- a/.github/actions/conventional-commits/action.yml +++ b/.github/actions/conventional-commits/action.yml @@ -6,7 +6,7 @@ runs: - uses: actions/github-script@v5 with: script: | - const validator = /^(chore|feat|fix|revert|docs|style)(\((((CCIE|CDI|PRODSEC|SECENG|ONCALL)-[0-9]+)|([a-z]+))\))?(!)?: (.)+$/ + const validator = /^(chore|feat|fix|revert|docs|style)(\((((CCIE|CDI|PRODSEC|SECENG|ONCALL)-[0-9]+)|([a-z-]+))\))?(!)?: (.)+$/ const title = context.payload.pull_request.title const is_valid = validator.test(title) From b2a74da378496645bb6ebe3a820fa6b19cba05f9 Mon Sep 17 00:00:00 2001 From: Jerry Fu <2072627+jfoo1984@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:24:26 -0800 Subject: [PATCH 2/2] feat: Add resusable action to set app config with happy config (#233) Co-authored-by: Jake Heath <76011913+jakeyheath@users.noreply.github.com> --- .github/actions/happy-config-set/action.yml | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/actions/happy-config-set/action.yml diff --git a/.github/actions/happy-config-set/action.yml b/.github/actions/happy-config-set/action.yml new file mode 100644 index 00000000..4ff632f1 --- /dev/null +++ b/.github/actions/happy-config-set/action.yml @@ -0,0 +1,29 @@ +name: Set app configs with happy config +description: This workflow will set an app config in a given environment using happy config +inputs: + app_config_name: + description: The name of the app config to set + required: true + type: string + app_config_value: + description: The value to set for the app config + required: true + type: string + happy_env: + description: The happy environment to set the app config in + required: true + type: string +runs: + using: "composite" + steps: + - name: Get Id Token + uses: actions/github-script@v6 + with: + script: | + const id_token = await core.getIDToken() + core.setOutput('id_token', id_token) + core.exportVariable('id_token', id_token); + - name: Set env var + shell: bash + run: | + HAPPY_OIDC_ID_TOKEN=${{env.id_token}} happy config set ${{ inputs.env_var_name }} ${{ inputs.env_var_value }} --env ${{ inputs.happy_env }} --aws-profile ""