Skip to content

Commit

Permalink
keep new local test file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Apr 15, 2024
1 parent e64032b commit 492cb7b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/local-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,26 @@ jobs:
token: testtoken
secrets: |
secret/data/test-json-string jsonString;
secret/data/test-json-data jsonData;
- name: Check Secrets
run: |
touch secrets.json
echo "${{ steps.import-secrets.outputs.jsonString }}" >> secrets.json
- uses: actions/github-script@v7
with:
github-token: "foobar"
script: |
const { JSONSTRING, JSONDATA } = process.env
console.log(`string ${JSONSTRING}`)
console.log(`data ${JSONDATA}`)
const str = JSONDATA
- name: Check json file format
run: |
echo
cat secrets.json
jq -c . < secrets.json
let valid = true
try {
JSON.parse(str)
} catch (e) {
valid = false
}
if (valid) {
console.log("valid json")
} else {
console.log("not valid json")
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.PHONY: local-test
local-test:
docker compose down; docker-compose up -d vault && act workflow_dispatch -j local-test
docker compose down; docker-compose up -d vault && act workflow_dispatch -j local-test -W .github/workflows/local-test.yaml

0 comments on commit 492cb7b

Please sign in to comment.