Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reviewed triggering paths for all the actions #163

Merged
merged 14 commits into from
Mar 27, 2024
5 changes: 4 additions & 1 deletion .github/workflows/assessment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ on:
branches: [ "main" ]
paths:
- 'assessment/**'
- 'pipeline/**'
- .github/workflows/assessment.yml
- .github/workflows/main.yml

jobs:
call-main-workflow:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
with:
workflow_id: assessment
secrets: inherit
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- main
paths:
- '**/*.sh'
- .github/workflows/checks.yaml

jobs:
shellcheck:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/escalation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- 'escalation/**'
- 'pipeline/**'
- 'scripts/**'
- .github/workflows/escalation.yml
- .github/workflows/workflow-executor.yml

jobs:
escalation-workflow:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/greeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
paths:
- 'greeting/**'
- 'pipeline/**'
- .github/workflows/greeting.yml
- .github/workflows/main.yml

jobs:
call-main-workflow:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
with:
workflow_id: greeting
secrets: inherit
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/jira-listener.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- 'escalation/jira-listener/**'
- 'pipeline/**'
- 'scripts/**'
- .github/workflows/jira-listener.yml
- .github/workflows/workflow-executor.yml

jobs:
jira-listener:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/m2k-func.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
paths:
- 'move2kube/m2k-func/**'
- 'pipeline/**'
- .github/workflows/m2k-func.yaml

env:
WORKDIR: move2kube/m2k-func
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
workflow_id:
required: true
type: string
push_pr:
required: false
it_mode:
type: boolean
default: true
default: false

env:
DOCKERFILE: workflow-builder${{ inputs.it_mode== true && '-dev' || ''}}.Dockerfile
WF_CONFIG_REPO: parodos-dev/serverless-workflows-config

jobs:
Expand All @@ -23,6 +23,7 @@ jobs:

- name: Log in to Red Hat Registry
uses: redhat-actions/podman-login@v1
if: ${{ ! inputs.it_mode }}
with:
registry: registry.redhat.io
username: ${{ secrets.REGISTRY_REDHAT_IO_USER }}
Expand All @@ -36,26 +37,26 @@ jobs:
tags: latest ${{ github.sha }}
extra-args: --ulimit nofile=4096:4096
containerfiles: |
pipeline/workflow-builder.Dockerfile
pipeline/${{ env.DOCKERFILE }}
build-args: |
WF_RESOURCES=${{ inputs.workflow_id }}/
QUARKUS_EXTENSIONS=org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-SNAPSHOT

- name: Buildah push to OCI Arcive
if: ${{ ! inputs.push_pr }}
if: ${{ inputs.it_mode }}
run: |
buildah push serverless-workflow-${{ inputs.workflow_id }}:${{ github.sha }} \
oci-archive:serverless-workflow-${{ inputs.workflow_id }}-${{ github.sha }}.tar:quay.io/orchestrator/serverless-workflow-${{ inputs.workflow_id }}:${{ github.sha }}
- name: Save OCI archive
if: ${{ ! inputs.push_pr }}
if: ${{ inputs.it_mode }}
uses: actions/upload-artifact@v3
with:
name: serverless-workflow-${{ inputs.workflow_id }}-${{ github.sha }}.tar
path: serverless-workflow-${{ inputs.workflow_id }}-${{ github.sha }}.tar

- name: Push To quay.io
id: push-to-quay
if: ${{ inputs.push_pr }}
if: ${{ ! inputs.it_mode }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
})
).data[0];
- name: Send PRs to config repo
if: ${{ inputs.push_pr }}
if: ${{ ! inputs.it_mode }}
env:
GH_TOKEN: ${{ secrets.HELM_REPO_TOKEN }}
run: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/move2kube-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ on:
paths:
- 'move2kube/**'
- 'pipeline/**'
- .github/workflows/move2kube-e2e.yaml
- .github/workflows/m2k-func.yaml
- .github/workflows/main.yml

jobs:
build:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
secrets: inherit
with:
workflow_id: move2kube
push_pr: false
it_mode: true

build-m2k-kfunc:
uses: parodos-dev/serverless-workflows/.github/workflows/m2k-func.yaml@main
uses: ./.github/workflows/m2k-func.yaml
secrets: inherit
with:
push_pr: false
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/move2kube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ on:
- 'move2kube/**'
- 'pipeline/**'
- 'e2e/move2kube.sh'
- .github/workflows/move2kube-e2e.yaml
- .github/workflows/m2k-func.yaml
- .github/workflows/main.yml

jobs:
call-kfunc-workflow:
uses: parodos-dev/serverless-workflows/.github/workflows/m2k-func.yaml@main
uses: ./.github/workflows/m2k-func.yaml
secrets: inherit
call-main-workflow:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
with:
workflow_id: move2kube
secrets: inherit
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/mta-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ on:
- 'pipeline/**'
- 'e2e/mta.sh'
- '!mta/*.svg'
- .github/workflows/mta-e2e.yaml
- .github/workflows/main.yml

jobs:
build:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
secrets: inherit
with:
workflow_id: mta
push_pr: false

it_mode: true
run-e2e:
runs-on: ubuntu-latest
needs: build
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
paths:
- 'mta/**'
- 'pipeline/**'
- .github/workflows/mta.yml
- .github/workflows/main.yml

jobs:
call-main-workflow:
uses: parodos-dev/serverless-workflows/.github/workflows/main.yml@main
uses: ./.github/workflows/main.yml
with:
workflow_id: mta
secrets: inherit
Expand Down
Loading