diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 0492a665..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# restrict access to approving workflow changes -.github/workflows/ @NHSDigital/eps-admins diff --git a/.github/workflows/auto_approve_dependabot.yml b/.github/workflows/auto_approve_dependabot.yml new file mode 100644 index 00000000..4567aef8 --- /dev/null +++ b/.github/workflows/auto_approve_dependabot.yml @@ -0,0 +1,21 @@ +name: Auto-approve dependency updates + +on: + workflow_dispatch: + schedule: + - cron: '*/30 * * * *' + +permissions: {} +jobs: + auto-approve-dependabot: + runs-on: ubuntu-22.04 + environment: create_pull_request + permissions: + contents: write + pull-requests: write + steps: + - name: Auto approve and enable auto-merge + uses: NHSDigital/eps-dependabot-approve@da0503449b218ccd99bc547e242007d5514e4d2f + with: + AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }} + AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }} \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 37b5621f..2296985b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,21 +1,9 @@ name: Pull request test and deploy - on: pull_request: branches: [main] - permissions: {} - jobs: - dependabot-auto-approve-and-merge: - needs: quality_checks - uses: NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929 - permissions: - contents: write - pull-requests: write - secrets: - AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }} - AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }} get_config_values: uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929 permissions: @@ -35,18 +23,15 @@ jobs: pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - pr_title_format_check: uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929 permissions: pull-requests: write - get_issue_number: runs-on: ubuntu-22.04 needs: quality_checks outputs: issue_number: ${{steps.get_issue_number.outputs.result}} - steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 name: get issue number @@ -67,7 +52,6 @@ jobs: ).data[0].number; } result-encoding: string - tag_release: needs: [get_config_values] uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929 @@ -80,7 +64,6 @@ jobs: pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} branch_name: ${{ github.event.pull_request.head.ref }} tag_format: ${{ needs.get_config_values.outputs.tag_format }} - get_commit_id: runs-on: ubuntu-22.04 outputs: @@ -90,7 +73,6 @@ jobs: id: commit_id run: | echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT" - package_code: needs: [get_issue_number, get_config_values] uses: ./.github/workflows/sam_package_code.yml @@ -100,7 +82,6 @@ jobs: packages: read with: pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} - release_code: needs: [get_issue_number, package_code, get_commit_id, get_config_values] uses: ./.github/workflows/sam_release_code.yml