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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Order is important: the last matching pattern takes the most precedence

# These owners will be the default owners for everything
* @masterpointio/masterpoint-internal
* @masterpointio/masterpoint-open-source
61 changes: 48 additions & 13 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,62 @@
"config:best-practices",
"github>aquaproj/aqua-renovate-config#2.7.5"
],
"schedule": [
"after 9am on the first day of the month"
],
"assigneesFromCodeOwners": true,
"dependencyDashboardAutoclose": true,
"addLabels": [
"auto-upgrade"
],
"enabledManagers": [
"terraform"
"terraform",
"github-actions"
],
"terraform": {
"ignorePaths": [
"**/context.tf" // Mixin file https://github.com/cloudposse/terraform-null-label/blob/main/exports/context.tf
],
"fileMatch": [
"\\.tf$",
"\\.tofu$"
]
},
"schedule": [
"after 9am on the first day of the month"
],
"assigneesFromCodeOwners": true,
"dependencyDashboardAutoclose": true,
"addLabels": ["{{manager}}"],
"packageRules": [
{
"matchDepTypes": [
"optionalDependencies"
]
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true,
"automergeType": "branch",
"groupName": "github-actions-auto-upgrade",
"addLabels": ["auto-upgrade"]
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"groupName": "github-actions-needs-review",
"addLabels": ["needs-review"]
},
{
"matchManagers": ["terraform"],
"groupName": "tf",
"addLabels": ["needs-review"]
},
{
"matchFileNames": ["**/*.tofu", "**/*.tf"],
"matchDatasources": ["terraform-provider", "terraform-module"],
"registryUrls": ["https://registry.opentofu.org"],
"groupName": "tf"
},
{
"matchFileNames": ["**/*.tofu"],
"matchDepTypes": ["required_version"],
"registryUrls": ["https://registry.opentofu.org"],
"groupName": "tf"
},
{
"matchFileNames": ["**/*.tf"],
"matchDepTypes": ["required_version"],
"registryUrls": ["https://registry.terraform.io"],
"groupName": "tf"
}
]
}
}
15 changes: 13 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Lint

concurrency:
group: lint-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: pull_request

permissions:
Expand All @@ -13,6 +17,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Trunk Check
uses: trunk-io/trunk-action@v1
uses: trunk-io/trunk-action@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19

conventional-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
permissions:
contents: write
pull-requests: write
issues: write # required for label creation
issues: write

jobs:
release-please:
Expand Down
29 changes: 6 additions & 23 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request:
pull_request_target:

permissions:
actions: read
Expand All @@ -15,31 +15,14 @@ permissions:

jobs:
tf-test:
name: ${{ matrix.tf }} Test
name: 🧪 ${{ matrix.tf }} test
runs-on: ubuntu-latest
strategy:
matrix:
tf: [tofu, terraform]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Aqua Cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
if: ${{ !github.event.act }} # Don't enable the cache step if we're using act for testing
with:
path: ~/.local/share/aquaproj-aqua
key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('aqua.yaml')}}
restore-keys: |
v1-aqua-installer-${{runner.os}}-${{runner.arch}}-

- name: Install Aqua
uses: aquaproj/aqua-installer@5e54e5cee8a95ee2ce7c04cb993da6dfad13e59c # v3.2.1
- uses: masterpointio/github-action-tf-test@c3b619f3bca9e4f482b9e0fb3166ab3f02d9d54c # v1.0.0
with:
aqua_version: v2.48.1

- name: Aqua Install
shell: bash
run: aqua install --tags ${{ matrix.tf }}

- run: ${{ matrix.tf }} init
- run: ${{ matrix.tf }} test
tf_type: ${{ matrix.tf }}
aws_role_arn: ${{ vars.TF_TEST_AWS_ROLE_ARN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 11 additions & 2 deletions .github/workflows/trunk-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Create Token for MasterpointBot App
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
Expand All @@ -27,8 +27,17 @@ jobs:
private_key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}

- name: Upgrade
uses: trunk-io/trunk-action/upgrade@86b68ffae610a05105e90b1f52ad8c549ef482c2 #v1.1.16
id: trunk-upgrade
uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19
with:
github-token: ${{ steps.generate-token.outputs.token }}
reviewers: "@masterpointio/masterpoint-internal"
prefix: "chore: "

- name: Merge PR automatically
if: steps.trunk-upgrade.outputs.pull-request-number != ''
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_NUMBER: ${{ steps.trunk-upgrade.outputs.pull-request-number }}
run: |
gh pr merge "$PR_NUMBER" --squash --auto --delete-branch