Skip to content
Draft
113 changes: 69 additions & 44 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,73 @@ jobs:
conditional-skip:
uses: ./.github/workflows/reusable-conditional-skip.yml

test:
name: test
needs: [ conditional-skip ]
if: needs.conditional-skip.outputs.skip-ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1.2.3
name: test
with:
workflow: test.yml
repo: hashicorp/consul-k8s-workflows
ref: main
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# set "test-ce" to false when a new minor version is released
inputs: '{ "test-ce": false, "context":"${{ env.CONTEXT }}", "actor":"${{ github.actor }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ env.SHA }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'

cloud-acceptance:
name: cloud-acceptance
runs-on: ubuntu-24.04
steps:
- uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1.2.3
name: cloud
with:
workflow: cloud.yml
repo: hashicorp/consul-k8s-workflows
ref: shani/update-max-parallel
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}-${{ github.event.pull_request.number }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'
# test:
# name: test
# needs: [ conditional-skip ]
# if: needs.conditional-skip.outputs.skip-ci != 'true'
# runs-on: ubuntu-latest
# steps:
# - uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1.2.3
# name: test
# with:
# workflow: test.yml
# repo: hashicorp/consul-k8s-workflows
# ref: main
# token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# # set "test-ce" to false when a new minor version is released
# inputs: '{ "test-ce": false, "context":"${{ env.CONTEXT }}", "actor":"${{ github.actor }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ env.SHA }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'
pass-required-checks-on-skip:
needs: [ conditional-skip ]
if: needs.conditional-skip.outputs.skip-ci == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# The required checks that should be "passed" when the CI is skipped
- check-name: acceptance
- check-name: acceptance-cni
- check-name: acceptance-tproxy
- check-name: Unit test helm templates
- check-name: Unit test helm gen
- check-name: Unit test enterprise control plane
- check-name: Unit test control plane
- check-name: Unit test cli
- check-name: Unit test acceptance
- check-name: Unit test helm gen
steps:
- name: Update final status
uses: docker://ghcr.io/curtbushko/commit-status-action:e1d661c757934ab35c74210b4b70c44099ec747a
env:
INPUT_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
INPUT_REPOSITORY: ${{ github.repository }}
INPUT_CONTEXT: ${{ matrix.check-name }}
INPUT_STATE: success
INPUT_DESCRIPTION: "Skipped due to conditional-skip check"
INPUT_SHA: ${{ env.SHA }}
INPUT_DETAILS_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
INPUT_OWNER: "hashicorp"
needs: [ conditional-skip ]
if: needs.conditional-skip.outputs.skip-ci == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# The required checks that should be "passed" when the CI is skipped
- check-name: acceptance
- check-name: acceptance-cni
- check-name: acceptance-tproxy
- check-name: Unit test helm templates
- check-name: Unit test helm gen
- check-name: Unit test enterprise control plane
- check-name: Unit test control plane
- check-name: Unit test cli
- check-name: Unit test acceptance
- check-name: Unit test helm gen
steps:
- name: Update final status
uses: docker://ghcr.io/curtbushko/commit-status-action:e1d661c757934ab35c74210b4b70c44099ec747a
env:
INPUT_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
INPUT_REPOSITORY: ${{ github.repository }}
INPUT_CONTEXT: ${{ matrix.check-name }}
INPUT_STATE: success
INPUT_DESCRIPTION: "Skipped due to conditional-skip check"
INPUT_SHA: ${{ env.SHA }}
INPUT_DETAILS_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
INPUT_OWNER: "hashicorp"
# cloud-acceptance:
# name: cloud-acceptance
# runs-on: ubuntu-24.04
# steps:
# - uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1.2.3
# name: cloud
# with:
# workflow: cloud.yml
# repo: hashicorp/consul-k8s-workflows
# ref: shani/update-max-parallel
# token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# inputs: '{ "context":"${{ env.CONTEXT }}-${{ github.event.pull_request.number }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'
Loading
Loading