Created
July 4, 2022 18:09
-
-
Save leoGalani/1dcd74a2e7566416bd3e88dae63d11e0 to your computer and use it in GitHub Desktop.
workflow-calling-org-action
This file contains hidden or 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
name: 'E2E TEST' | |
description: 'E2E Tests foobar' | |
inputs: | |
required_env_key_for_the_tests: | |
required: true | |
foobar_secret: | |
required: true | |
outputs: | |
test_output: | |
description: "Execute tests and return results" | |
value: ${{ steps.execute-e2e-test.outputs.stdout }} | |
runs: | |
using: "composite" | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ inputs.required_env_key_for_the_tests }} | |
aws-secret-access-key: ${{ inputs.foobar_secret }} | |
aws-region: eu-central-1 | |
- name: Setup | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: yarn install | |
shell: bash | |
- id: execute-e2e-test | |
run: yarn test | |
shell: bash |
This file contains hidden or 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
jobs: | |
deploy-dev: | |
name: Deploy DEV | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- uses: actions/checkout@v2 | |
- id : foobar | |
run: echo 'foobar' | |
shell: bash | |
dev-e2e-test: | |
name: Run E2E tests on dev | |
needs: [deploy-dev] | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: MYORG/mytestrepository | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: MYORG/mytestrepository@main | |
with: | |
aws_access_key: ${{ secrets.ACCESS_KEY }} | |
aws_secret_key: ${{ secrets.SECRET_KEY }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment