feat: github action remote workflow #126
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
validate: | |
uses: saidsef/saidsef/.github/workflows/tf-validate.yaml@main | |
with: | |
start-version: '3' | |
end-version: '8' | |
tfsec: | |
uses: saidsef/saidsef/.github/workflows/tf-security.yaml@main | |
needs: [validate] | |
attest: | |
uses: saidsef/saidsef/.github/workflows/tf-attest.yaml@main | |
needs: [tfsec] | |
caller-identity-check: | |
if: contains(github.event_name, 'pull_request') | |
runs-on: ubuntu-latest | |
name: Return the IAM user | |
needs: [validate, tfsec] | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions | |
role-session-name: ${{ github.event.repository.name }}-${{ github.ref_type }} | |
- run: | | |
aws sts get-caller-identity | |
auto-approve: | |
uses: saidsef/saidsef/.github/workflows/auto-approve.yaml@main | |
needs: [validate, tfsec, caller-identity-check] |