Skip to content

Commit

Permalink
ci: Update on_pull_request and on_push (#55)
Browse files Browse the repository at this point in the history
Update CI to use changes from canonical/charmed-kubeflow-workflows#36. 

- Update on_pull_request 
- Add on_push workflow
- Disable scheduled build_and_scan since ATM it's not working and it's only polluting
GH actions tab. This is bound to be redesigned as part of canonical/bundle-kubeflow#782.

Ref canonical/charmed-kubeflow-workflows#31
  • Loading branch information
orfeas-k authored Jan 10, 2024
1 parent 3d48bff commit 917597b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 50 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build_and_scan_rocks.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Build and scan ROCKs, save and send scan reports

on:
schedule:
workflow_dispatch:
# Disable scheduling since ATM it's not working and this should be refactored
# be refactored as part of https://github.com/canonical/bundle-kubeflow/issues/782.
# Add `workflow_dispatch` since otherwise the workflow will be invalid.
# schedule:
# every day at 1:12AM UTC
- cron: '12 1 * * *'
secrets:
CVE_REPORT_JIRA_URL:
required: true
# - cron: '12 1 * * *'
# secrets:
# CVE_REPORT_JIRA_URL:
# required: true

jobs:
build-scan-rocks:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/integrate.yaml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: On Pull Request

# On pull_request, we:
# * always build the rocks
# * always run tests

on:
pull_request:

jobs:

tests:
name: Run Tests
uses: ./.github/workflows/integrate.yaml
on-pull-request:
name: Get ROCKs modified and build-scan-test them
uses: canonical/charmed-kubeflow-workflows/.github/workflows/get-rocks-modified-and-build-scan-test-publish.yaml@main
permissions:
pull-requests: read
secrets: inherit
with:
microk8s-channel: 1.26/stable
juju-channel: 3.1/stable
python-version: "3.8"
20 changes: 20 additions & 0 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: On Push

on:
push:
branches:
- main
- track/**

jobs:

on-push:
name: Get ROCKs modified and build-scan-test-publish them
uses: canonical/charmed-kubeflow-workflows/.github/workflows/get-rocks-modified-and-build-scan-test-publish.yaml@main
permissions:
pull-requests: read
secrets: inherit
with:
microk8s-channel: 1.26/stable
juju-channel: 3.1/stable
python-version: "3.8"

0 comments on commit 917597b

Please sign in to comment.