-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * First version
- Loading branch information
Showing
12 changed files
with
10,854 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Test branch-based-secrets" | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
latest: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- run: npm ci | ||
- run: npm run package | ||
|
||
- run: printenv | ||
|
||
- uses: ./ | ||
with: | ||
secrets: TESTSECRET | ||
|
||
- run: printenv | ||
|
||
- if: ${{ github.ref == 'refs/heads/master' && env.TARGET_BRANCH != 'master' }} | ||
run: | | ||
echo "Assertion failed for TARGET_BRANCH: $TARGET_BRANCH != master" | ||
exit 1 | ||
- if: ${{ github.ref == 'refs/heads/master' && env.TARGET_BRANCH_U != 'MASTER' }} | ||
run: | | ||
echo "Assertion failed for TARGET_BRANCH_U: $TARGET_BRANCH_U != MASTER" | ||
exit 1 | ||
- if: ${{ env.TESTSECRET_NAME != format('TESTSECRET_{0}', env.TARGET_BRANCH_U) }} | ||
run: | | ||
echo "Assertion failed for TESTSECRET_NAME: $TESTSECRET_NAME != TESTSECRET_MASTER" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: "Branch based secrets" | ||
description: "Creates environment variables pointing to secrets that are specific to this branch" | ||
author: "Noam Liran" | ||
|
||
inputs: | ||
secrets: | ||
description: "List of secrets to generate names for, separated by commas" | ||
required: true | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.