Skip to content

Commit

Permalink
chore: improve chances that i see an actual log despite gh actions co…
Browse files Browse the repository at this point in the history
…nstantly going down
  • Loading branch information
dweller23 committed Jun 21, 2022
1 parent d5ce5a6 commit 8cfe69a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ jobs:
- name: Install packages
run: yarn

- name: Test accessing env by key
id: get-secret
uses: actions/github-script@v6
env:
secret1: ${{ secrets.SECRET_1 }}
secret2: ${{ secrets.SECRET_2 }}
env: stage
with:
script: |
return process.env.env === 'stage' ? process.env.SECRET_1 : process.env.SECRET_2
result: string
- name: Echo result
run: echo ${{ steps.get-secret.outputs.result }}
shell: bash
- name: Validate result
id: validate-result
uses: actions/github-script@v6
env:
secret1: ${{ secrets.SECRET_1 }}
with:
script: |
return context.steps['get-secret'].outputs.result === process.env.SECRET_1
result: string
- name: Echo validation
run: echo ${{ steps.validate-result.outputs.result }}
shell: bash

build:
name: Build artifact
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deploy-with-release-draft-poc",
"version": "0.0.46",
"version": "0.0.47",
"private": true,
"scripts": {
"build": "tsc",
Expand Down

0 comments on commit 8cfe69a

Please sign in to comment.