Skip to content

Commit

Permalink
First version (#1)
Browse files Browse the repository at this point in the history
* Initial commit
* First version
  • Loading branch information
noliran authored Oct 9, 2020
1 parent a91fde6 commit 3219199
Show file tree
Hide file tree
Showing 12 changed files with 10,854 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
12 changes: 12 additions & 0 deletions action.yml
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'
569 changes: 569 additions & 0 deletions dist/LICENSE

Large diffs are not rendered by default.

Loading

0 comments on commit 3219199

Please sign in to comment.