Skip to content

Test This Composite Action #12

Test This Composite Action

Test This Composite Action #12

Workflow file for this run

name: Test This Composite Action
on:
workflow_dispatch:
env:
AWS_ROLE: "arn:aws:iam::241033177617:role/allow-test-repo"
AWS_REGION: "us-east-1"
ARM_CLIENT_ID: "03b75287-e30e-4ac5-813b-ca074c26a325"
ARM_SUBSCRIPTION_ID: "a267dbd7-a0ac-4f3e-a310-6bb813ff3078"
ARM_TENANT_ID: "68f381e3-46da-47b9-ba57-6f322b8f0da1"
ARM_USE_OIDC: true
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
test-aws:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: "${{ env.AWS_ROLE }}"
role-session-name: test-action-session
aws-region: ${{ env.AWS_REGION }}
- name: Test actions with an AWS backend
uses: ./ # Uses an action in the root directory
with:
working-directory: test/test-aws
no-pr: true
- name: Cleanup AWS test
working-directory: test/test-aws
run: |
terraform destroy -auto-approve
test-azure:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Az CLI login'
uses: azure/login@v2
with:
client-id: ${{ env.ARM_CLIENT_ID }}
tenant-id: ${{ env.ARM_TENANT_ID }}
subscription-id: ${{ env.ARM_SUBSCRIPTION_ID }}
- name: Test actions with an Azure backend
uses: ./ # Uses an action in the root directory
with:
working-directory: test/test-azure
no-pr: true
- name: Cleanup Azure test
working-directory: test/test-azure
run: |
terraform destroy -auto-approve
# test-gcp:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - id: 'auth'
# name: 'Authenticate to GCP'
# uses: 'google-github-actions/auth@v0.3.1'
# with:
# create_credentials_file: 'true'
# workload_identity_provider: '<example-workload-identity-provider>'
# service_account: '<example-service-account>'
# - id: 'gcloud'
# name: 'gcloud'
# run: |-
# gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}"
# gcloud services list