From c67a832c1082fbfee32057e2b8674e945fc345ce Mon Sep 17 00:00:00 2001 From: Tim <105686517+imtmcdonald@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:07:56 -0400 Subject: [PATCH 1/5] fix: Update app_name and add secrets --- .github/workflows/_deploy.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_deploy.yaml b/.github/workflows/_deploy.yaml index e4d0dc0..5605176 100644 --- a/.github/workflows/_deploy.yaml +++ b/.github/workflows/_deploy.yaml @@ -23,8 +23,10 @@ jobs: uses: ./.github/workflows/deploy-to-fly.yaml secrets: fly_access_token: ${{ secrets.FLY_API_TOKEN }} + gloss_bot_slack_token: ${{ secrets.GLOSS_BOT_SLACK_TOKEN }} + slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} with: - app_name: glossary-bot-develop + app_name: hg-ops-glossarybot-develop environment: 'hg-sandbox' stable: @@ -33,6 +35,8 @@ jobs: uses: ./.github/workflows/deploy-to-fly.yaml secrets: fly_access_token: ${{ secrets.FLY_API_TOKEN }} + gloss_bot_slack_token: ${{ secrets.GLOSS_BOT_SLACK_TOKEN }} + slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} with: - app_name: glossary-bot-stable - environment: 'Hypergiant' \ No newline at end of file + app_name: hg-ops-glossarybot-stable + environment: 'Hypergiant' From 5b2d31e2feb2648e07303ce4f184654d05053711 Mon Sep 17 00:00:00 2001 From: Tim <105686517+imtmcdonald@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:43:07 -0400 Subject: [PATCH 2/5] Update fly.toml app name --- fly.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fly.toml b/fly.toml index 1e314f9..ea83ebd 100644 --- a/fly.toml +++ b/fly.toml @@ -3,7 +3,7 @@ # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # -app = "glossary-bot" +app = "hg-ops-glossarybot" primary_region = "iad" [build] From f88e5729cea440cdabffa0fa72d6654f1bf5d0ba Mon Sep 17 00:00:00 2001 From: Tim <105686517+imtmcdonald@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:47:39 -0400 Subject: [PATCH 3/5] Fix secret name in deploy-to-fly workflow --- .github/workflows/deploy-to-fly.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-to-fly.yaml b/.github/workflows/deploy-to-fly.yaml index cf52504..4b78a9c 100644 --- a/.github/workflows/deploy-to-fly.yaml +++ b/.github/workflows/deploy-to-fly.yaml @@ -54,8 +54,8 @@ jobs: --reuse-app \ $(printf "%s" "$ENV_PARAMS" | sed 's/^/-e /') \ -e FLY_APP_NAME=${{ inputs.app_name }} \ - -e SLACK_TOKEN=${{ secrets.GLOSS_BOT_SLACK_TOKEN }} \ - -e SLACK_WEBHOOK_URL=${{ secrets.SLACK_WEBHOOK_URL }} \ + -e SLACK_TOKEN=${{ secrets.gloss_bot_slack_token }} \ + -e SLACK_WEBHOOK_URL=${{ secrets.slack_webhook_url }} \ update-pr: runs-on: ubuntu-latest From 8cc3dc8d4cc44babd2c9c6f6b07472b52a72d8fc Mon Sep 17 00:00:00 2001 From: Tim <105686517+imtmcdonald@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:58:14 -0400 Subject: [PATCH 4/5] Remove set-fly-app name job because it is not needed --- .github/workflows/_deploy.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/_deploy.yaml b/.github/workflows/_deploy.yaml index 5605176..160a6e2 100644 --- a/.github/workflows/_deploy.yaml +++ b/.github/workflows/_deploy.yaml @@ -12,11 +12,6 @@ on: required: false jobs: - set-fly-app-name: - uses: ./.github/workflows/set-fly-app-name.yaml - with: - ref: ${{ inputs.branch || github.head_ref || github.ref }} # Use the input if it's there, otherwise use the head ref, otherwise use the ref - dev: concurrency: hg-sandbox if: github.ref == 'refs/heads/develop' From 9cc336754dd59c2ba9d78954ac4381f4fde6aaf0 Mon Sep 17 00:00:00 2001 From: Tim <105686517+imtmcdonald@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:00:57 -0400 Subject: [PATCH 5/5] Declare secrets in workflow inputs --- .github/workflows/deploy-to-fly.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy-to-fly.yaml b/.github/workflows/deploy-to-fly.yaml index 4b78a9c..4f22ec1 100644 --- a/.github/workflows/deploy-to-fly.yaml +++ b/.github/workflows/deploy-to-fly.yaml @@ -16,6 +16,12 @@ on: fly_access_token: description: 'Fly access token' required: true + gloss_bot_slack_token: + description: 'Gloss Bot Slack Token' + required: true + slack_webhook_url: + description: 'Slack Webhook URL' + required: true concurrency: group: ${{ inputs.app_name }} # Only one deploy at a time per app