Skip to content
Draft
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
20 changes: 20 additions & 0 deletions .github/workflows/extra-trigger.yml
Original file line number Diff line number Diff line change
@@ -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'
14 changes: 13 additions & 1 deletion .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,38 @@ 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
needs: files_changed
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
needs: files_changed
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
20 changes: 20 additions & 0 deletions .github/workflows/stackhpc-trigger.yml
Original file line number Diff line number Diff line change
@@ -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'
14 changes: 13 additions & 1 deletion .github/workflows/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 }}
20 changes: 20 additions & 0 deletions .github/workflows/trivyscan-trigger.yml
Original file line number Diff line number Diff line change
@@ -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'
14 changes: 13 additions & 1 deletion .github/workflows/trivyscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Loading