Skip to content

Commit

Permalink
pass secret
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-m-song committed Apr 15, 2024
1 parent 0dcdb50 commit 2855bf7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
type: boolean
description: whether or not to publish
default: false
secrets:
AWS_ECR_IMAGE_PUBLISHER_ROLE_ARN:
required: true

env:
image: public.ecr.aws/axatol/huisheng
Expand All @@ -22,16 +25,6 @@ jobs:
with:
show-progress: false

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- run: npm install

- run: npm run lint

- run: npm run compile

- uses: axatol/actions/assume-aws-role@release
if: inputs.publish
with:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
workflow_dispatch:
workflow_call:
secrets:
DISCORD_GITHUB_ACTIONS_WEBHOOK_URL:
required: true
NEW_RELIC_API_KEY:
DISCORD_WEBHOOK_URL:
required: true
NEW_RELIC_DEPLOYMENT_ENTITY_GUID:
required: true
Expand All @@ -18,7 +16,7 @@ jobs:
steps:
- uses: axatol/actions/send-deployment-notification@release
with:
webhook-url: ${{ secrets.DISCORD_GITHUB_ACTIONS_WEBHOOK_URL }}
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
job-status: pending

deploy:
Expand Down Expand Up @@ -50,5 +48,5 @@ jobs:
if: success() || failure()
uses: axatol/actions/send-discord-deployment-notification@release
with:
webhook-url: ${{ secrets.DISCORD_GITHUB_ACTIONS_WEBHOOK_URL }}
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
status: ${{ steps.deploy.outcome }}
5 changes: 3 additions & 2 deletions .github/workflows/push-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
uses: ./.github/workflows/_build.yml
with:
publish: true
secrets:
AWS_ECR_IMAGE_PUBLISHER_ROLE_ARN: ${{ secrets.AWS_ECR_IMAGE_PUBLISHER_ROLE_ARN }}

deploy:
needs: build
uses: ./.github/workflows/_deploy.yml
secrets:
DISCORD_GITHUB_ACTIONS_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUB_ACTIONS_WEBHOOK_URL }}
NEW_RELIC_API_KEY: ${{ secrets.NEW_RELIC_API_KEY }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
NEW_RELIC_DEPLOYMENT_ENTITY_GUID: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID }}

0 comments on commit 2855bf7

Please sign in to comment.