diff --git a/.github/workflows/extra-trigger.yml b/.github/workflows/extra-trigger.yml new file mode 100644 index 000000000..a57a2ed1e --- /dev/null +++ b/.github/workflows/extra-trigger.yml @@ -0,0 +1,20 @@ +--- +name: Trigger - Test extra build + +on: + workflow_call: + +permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + +jobs: + extra: + runs-on: ubuntu-latest + steps: + # No-op job to trigger workflow 'extra.yml' via workflow_run + - uses: jakejarvis/wait-action@master + with: + time: '1s' diff --git a/.github/workflows/extra.yml b/.github/workflows/extra.yml index 1941064a2..5317c0d25 100644 --- a/.github/workflows/extra.yml +++ b/.github/workflows/extra.yml @@ -6,8 +6,14 @@ name: Test extra build on: - workflow_call: workflow_dispatch: + #workflow_run: + # workflows: ["Trigger - Test extra build"] + # types: [completed,requested] + workflow_run: + workflows: ["Test on push and pull request"] + #types: [completed,requested] + types: [completed] permissions: contents: read @@ -16,6 +22,12 @@ permissions: statuses: write jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "event name is:" ${{ github.event_name }} + - run: echo "event type is:" ${{ github.event.action }} + doca: name: extra-build runs-on: ubuntu-22.04 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e2ccc71a..5bc1dba8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,8 +127,13 @@ jobs: needs: files_changed if: | needs.files_changed.outputs.stackhpc == 'true' - uses: ./.github/workflows/stackhpc.yml - secrets: inherit + #uses: ./.github/workflows/stackhpc-trigger.yml + # TEST - remove from here and uncomment the above + steps: + - uses: jakejarvis/wait-action@master + with: + time: '1s' + runs-on: ubuntu-latest extra: name: Test extra build @@ -136,8 +141,13 @@ jobs: if: | github.event_name != 'pull_request' && needs.files_changed.outputs.extra_on_push == 'true' || github.event_name == 'pull_request' && needs.files_changed.outputs.extra_on_pull_request == 'true' - uses: ./.github/workflows/extra.yml - secrets: inherit + #uses: ./.github/workflows/extra-trigger.yml + # TEST - remove from here and uncomment the above + steps: + - uses: jakejarvis/wait-action@master + with: + time: '1s' + runs-on: ubuntu-latest trivyscan: name: Trivy scan image for vulnerabilities @@ -145,5 +155,10 @@ jobs: if: | github.event_name == 'pull_request' && needs.files_changed.outputs.trivyscan == 'true' - uses: ./.github/workflows/trivyscan.yml - secrets: inherit + #uses: ./.github/workflows/trivyscan-trigger.yml + # TEST - remove from here and uncomment the above + steps: + - uses: jakejarvis/wait-action@master + with: + time: '1s' + runs-on: ubuntu-latest diff --git a/.github/workflows/stackhpc-trigger.yml b/.github/workflows/stackhpc-trigger.yml new file mode 100644 index 000000000..5eb2c0bb1 --- /dev/null +++ b/.github/workflows/stackhpc-trigger.yml @@ -0,0 +1,20 @@ +--- +name: Trigger - Test deployment and reimage on OpenStack + +on: + workflow_call: + +permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + +jobs: + stackhpc: + runs-on: ubuntu-latest + steps: + # No-op job to trigger workflow 'stackhpc.yml' via workflow_run + - uses: jakejarvis/wait-action@master + with: + time: '1s' diff --git a/.github/workflows/stackhpc.yml b/.github/workflows/stackhpc.yml index cb4e865b2..cb4e2fc68 100644 --- a/.github/workflows/stackhpc.yml +++ b/.github/workflows/stackhpc.yml @@ -6,8 +6,14 @@ name: Test deployment and reimage on OpenStack on: - workflow_call: workflow_dispatch: + #workflow_run: + # workflows: ["Trigger - Test deployment and reimage on OpenStack"] + # types: [completed,requested] + workflow_run: + workflows: ["Test on push and pull request"] + #types: [completed,requested] + types: [completed] permissions: contents: read @@ -16,6 +22,12 @@ permissions: statuses: write jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "event name is:" ${{ github.event_name }} + - run: echo "event type is:" ${{ github.event.action }} + openstack: name: openstack-ci runs-on: ubuntu-22.04 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..620fb7a97 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +--- +name: Test + +# This is a test workflow to see if we can introduce a new workflow (outside of the default branch) +# and have it trigger from the main CI. +# If it triggers, what will github.event_name be set to? +# Ideally we want to know whether we've triggered downstream from a push or a pull request. + +on: + workflow_call: + workflow_run: + workflows: ["Test on push and pull request"] + types: [completed,requested] + +permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "event name is:" ${{ github.event_name }} + - run: echo "event type is:" ${{ github.event.action }} diff --git a/.github/workflows/trivyscan-trigger.yml b/.github/workflows/trivyscan-trigger.yml new file mode 100644 index 000000000..cdb57b31f --- /dev/null +++ b/.github/workflows/trivyscan-trigger.yml @@ -0,0 +1,20 @@ +--- +name: Trigger - Trivy scan image for vulnerabilities + +on: + workflow_call: + +permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + +jobs: + trivyscan: + runs-on: ubuntu-latest + steps: + # No-op job to trigger workflow 'trivyscan.yml' via workflow_run + - uses: jakejarvis/wait-action@master + with: + time: '1s' diff --git a/.github/workflows/trivyscan.yml b/.github/workflows/trivyscan.yml index 8cfc8e44a..50a94ea29 100644 --- a/.github/workflows/trivyscan.yml +++ b/.github/workflows/trivyscan.yml @@ -6,8 +6,14 @@ name: Trivy scan image for vulnerabilities on: - workflow_call: workflow_dispatch: + #workflow_run: + # workflows: ["Trigger - Trivy scan image for vulnerabilities"] + # types: [completed,requested] + workflow_run: + workflows: ["Test on push and pull request"] + #types: [completed,requested] + types: [completed] permissions: contents: read @@ -16,6 +22,12 @@ permissions: statuses: write jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "event name is:" ${{ github.event_name }} + - run: echo "event type is:" ${{ github.event.action }} + scan: runs-on: ubuntu-latest strategy: