Skip to content

Commit

Permalink
Merge pull request #12 from gohypergiant/develop
Browse files Browse the repository at this point in the history
Fix issue with secrets and naming convention
  • Loading branch information
imtmcdonald authored Sep 14, 2023
2 parents 14e68c9 + 8283eaa commit 82c7393
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ 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'
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:
Expand All @@ -33,6 +30,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'
app_name: hg-ops-glossarybot-stable
environment: 'Hypergiant'
10 changes: 8 additions & 2 deletions .github/workflows/deploy-to-fly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -54,8 +60,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
Expand Down
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 82c7393

Please sign in to comment.