Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
name: CI

on:
pull_request:
branches:
- main
paths-ignore:
- .editorconfig
- .gitignore
- CHANGELOG.md
- LICENSE.md
- README.md
push:
branches:
- main
Expand All @@ -18,6 +9,7 @@ on:
- .gitignore
- CHANGELOG.md
- LICENSE.md
- Makefile
- README.md

jobs:
Expand All @@ -30,35 +22,17 @@ jobs:
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform_version }}
terraform_version: "1.10"
- name: Initialise with no backend
run: terraform init -backend=false
- name: Check formatting
run: terraform fmt -check -recursive
- name: Validate the configuration
run: terraform validate
strategy:
matrix:
terraform_version: [ "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6" ]

caller-identity:
if: ${{ github.event_name == 'push' }}
name: Return the IAM user
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github
- run: aws sts get-caller-identity

release:
name: Release?
needs: [ caller-identity ]
needs: [ verify ]
permissions:
contents: write
pull-requests: write
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PR

on:
pull_request:
branches:
- main
paths-ignore:
- .editorconfig
- .gitignore
- CHANGELOG.md
- LICENSE.md
- Makefile
- README.md

jobs:
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.10"
- name: Initialise with no backend
run: terraform init -backend=false
- name: Check formatting
run: terraform fmt -check -recursive
- name: Validate the configuration
run: terraform validate
Loading