add example workflow #30
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
# This is a basic workflow to help you get started with Actions | |
name: Connect to an AWS role from a GitHub repository | |
# Controls when the action will run. Invokes the workflow on push events but only for the main branch | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
AWS_REGION: 'us-east-1' | |
# Permission can be added at job level or workflow level | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
decrypt-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
- name: Install packages | |
run: yarn | |
- name: Check secrets | |
run: | | |
echo Key Exists=${{ secrets.AWS_ACCESS_KEY != '' }} | |
echo Secret Exists=${{ secrets.AWS_SECRET_ACCESS_KEY != '' }} | |
- name: Test encrypt/decrypt | |
run: node decrypt.js | |
env: | |
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |