Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/actions/build/action.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
dependencies:
applies-to: version-updates
update-types:
- major
- minor
- patch
202 changes: 202 additions & 0 deletions .github/workflows/integ.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
name: Integration Tests

on:
workflow_dispatch:
pull_request_target:
types: [labeled]
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
uppercase-transformation-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
name-transformation: uppercase
parse-json-secrets: true
secret-ids: |
SampleSecret1
/special/chars/secret
0/special/chars/secret
PrefixSecret*
JsonSecret
SAMPLESECRET1_ALIAS, SampleSecret1
- name: Assert
run: npm run integration-test __integration_tests__/name_transformation/uppercase.test.ts

lowercase-transformation-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
name-transformation: lowercase
parse-json-secrets: true
secret-ids: |
SampleSecret1
/special/chars/secret
0/special/chars/secret
PrefixSecret*
JsonSecret
samplesecret1_alias, SampleSecret1
- name: Assert
run: npm run integration-test __integration_tests__/name_transformation/lowercase.test.ts

none-transformation-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
name-transformation: none
parse-json-secrets: true
secret-ids: |
SampleSecret1
/special/chars/secret
0/special/chars/secret
PrefixSecret*
JsonSecret
SampleSecret1_Alias, SampleSecret1
- name: Assert
run: npm run integration-test __integration_tests__/name_transformation/none.test.ts

default-name-transformation-param-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
parse-json-secrets: true
secret-ids: |
SampleSecret1
/special/chars/secret
0/special/chars/secret
PrefixSecret*
JsonSecret
SAMPLESECRET1_ALIAS, SampleSecret1
- name: Assert
run: npm run integration-test __integration_tests__/name_transformation/uppercase.test.ts

default-parse-json-secrets-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
secret-ids: JsonSecret
- name: Assert Default Is No Json Secrets
run: npm run integration-test __integration_tests__/parse_json_secrets.test.ts

af-south-1-integration-test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name, 'safe-to-test')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: af-south-1
- name: Install dependencies
run: npm ci
- name: Build the dist folder
run: npm run build
- name: Act
uses: ./
with:
secret-ids: JsonSecret
auto-select-family-attempt-timeout: "2000"
- name: Assert
run: npm run integration-test __integration_tests__/parse_json_secrets.test.ts
31 changes: 31 additions & 0 deletions .github/workflows/pr_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Remove safe-to-test label when new commits are pushed

on:
pull_request_target:
types: [synchronize]

jobs:
remove-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: read
if: |
contains(github.event.pull_request.labels.*.name, 'safe-to-test')

steps:
- name: Remove label
run: |
echo "Removing label '$LABEL_NAME' from PR #$PR_NUMBER on repo $REPO"
gh_status=$(gh api "repos/$REPO/issues/$PR_NUMBER/labels/$LABEL_NAME" -X DELETE | jq 'if type == "object" then .status else empty end' --raw-output)
case $gh_status in
"") echo "Label removed" ;;
404) echo "Label not found — ignoring" ;;
*) echo "unexpected HTTP $gh_status" && exit 1 ;;
esac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LABEL_NAME: safe-to-test
REPO: ${{ github.event.pull_request.base.repo.full_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
Loading