diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82d2ac9..273eed0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,20 @@ on: schedule: - cron: "0 22 * * *" +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest + permissions: + contents: write + pull-request: write steps: - - uses: jmertic/lfx-landscape-tools@main + - uses: jmertic/lfx-landscape-tools@d34c5300ea55dae32df9fac122a924d2f85fbb87 # 20260415 with: project_processing: skip env: diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..a201c4a --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,33 @@ +name: Auto-merge Dependabot PRs + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Approve PR + run: | + gh pr review --approve "${{ github.event.pull_request.number }}" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto-merge + run: | + gh pr merge \ + --squash \ + --auto \ + "${{ github.event.pull_request.number }}" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e3e7e17..1ac084a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,4 @@ -name: Validate +name: Validate Landscape on: merge_group: @@ -7,20 +7,23 @@ on: - main - master +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: validate-landscape: runs-on: ubuntu-latest name: "Validate landscape.yml file" + permissions: + contents: read steps: - - uses: actions/checkout@v5 - - uses: cncf/landscape2-validate-action@v2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: cncf/landscape2-validate-action@6381e8747c73412e638670807b402ef2b863e9f8 # v2.0.1 with: target_kind: data target_path: ./landscape.yml - - uses: pascalgn/automerge-action@v0.16.4 - if: success() - env: - GITHUB_TOKEN: "${{ secrets.PAT }}" - MERGE_LABELS: "automated-build" - MERGE_RETRY_SLEEP: 300000 - MERGE_METHOD: "squash"