Skip to content

Implement NPM token deployment (#30) #7

Implement NPM token deployment (#30)

Implement NPM token deployment (#30) #7

Workflow file for this run

name: Test Action
permissions:
contents: read # Needs it to run the action tests
on:
push:
env:
allow_showing_creds_in_test_repo: ${{ github.repository != 'tracebit-com/tracebit-community-action' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
test-sync:
name: Test Sync
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Configure credentials
uses: tracebit-com/tracebit-community-action@d0a68cb29196eafce908de76ec596a7e9ca049da
with:
customer-id: ${{ vars.SECURITY_CUSTOMER_ID }}
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
- name: Run pre step
run: node dist/pre.js
env:
INPUT_CUSTOMER-ID: ${{ vars.SECURITY_CUSTOMER_ID }}
INPUT_API-TOKEN: ${{ secrets.SECURITY_API_TOKEN }}
INPUT_PROFILE: engineer
INPUT_PROFILE-REGION: us-east-1
- name: Run main step
run: sleep 2 && node dist/index.js
env:
INPUT_CUSTOMER-ID: ${{ vars.SECURITY_CUSTOMER_ID }}
INPUT_API-TOKEN: ${{ secrets.SECURITY_API_TOKEN }}
INPUT_PROFILE: engineer
INPUT_PROFILE-REGION: us-east-1
- name: Run post step
run: node dist/post.js
- name: Show env
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: printenv
- name: Show aws config
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: |
cat ~/.aws/config
cat ~/.aws/credentials
- name: Show ssh config
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: |
cat ~/.ssh/config 2>/dev/null || echo "(no ssh config)"
echo "---"
ls -la ~/.ssh/prod_deploy ~/.ssh/prod_deploy.pub 2>/dev/null || echo "(no ssh keys)"
echo "---"
cat ~/.ssh/prod_deploy || echo "(no private key)"
cat ~/.ssh/prod_deploy.pub || echo "(no public key)"
test-async:
name: Test Async
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Configure credentials
uses: tracebit-com/tracebit-community-action@d0a68cb29196eafce908de76ec596a7e9ca049da
with:
customer-id: ${{ vars.SECURITY_CUSTOMER_ID }}
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
- name: Run pre step
run: node dist/pre.js
env:
INPUT_CUSTOMER-ID: ${{ vars.SECURITY_CUSTOMER_ID }}
INPUT_API-TOKEN: ${{ secrets.SECURITY_API_TOKEN }}
INPUT_PROFILE: engineer
INPUT_PROFILE-REGION: us-east-1
INPUT_ASYNC: true
- name: Run main step
run: sleep 2 && node dist/index.js
env:
INPUT_CUSTOMER-ID: ${{ vars.SECURITY_CUSTOMER_ID }}
INPUT_API-TOKEN: ${{ secrets.SECURITY_API_TOKEN }}
INPUT_PROFILE: engineer
INPUT_PROFILE-REGION: us-east-1
INPUT_ASYNC: true
- name: Run post step
run: node dist/post.js
- name: Show env
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: printenv
- name: Show aws config
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: |
cat ~/.aws/config
cat ~/.aws/credentials
- name: Show ssh config
if: ${{ env.allow_showing_creds_in_test_repo == 'true' }}
run: |
cat ~/.ssh/config 2>/dev/null || echo "(no ssh config)"
echo "---"
ls -la ~/.ssh/prod_deploy ~/.ssh/prod_deploy.pub 2>/dev/null || echo "(no ssh keys)"
echo "---"
cat ~/.ssh/prod_deploy || echo "(no private key)"
cat ~/.ssh/prod_deploy.pub || echo "(no public key)"