[containers/*] Enable scheduled workflow (#9)

* Enable scheduled job
* fail-fast was disabled to avoid the eviction of any execution. By default if one of the jobs in a loop fails, the rest of the jobs will be aborted
* With latest vmware-image-builder-action version the problem resolving the SHA_ARCHIVE variable is fixed. We can remove the workaround

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero 2022-06-21 13:00:55 +02:00 committed by GitHub
parent 9a2aaed1c4
commit 2e1b8b72bf
3 changed files with 5 additions and 54 deletions

View File

@ -1,8 +1,7 @@
name: Scheduled VIB
on:
# Scheduled workflow disabled due to an error in vmware-image-builder-action
# schedule:
# - cron: "?/15 * * * *"
schedule:
- cron: "?/15 * * * *"
workflow_dispatch:
inputs:
container:
@ -42,6 +41,7 @@ jobs:
needs: get-container
name: Verify
strategy:
fail-fast: false
matrix:
flavor: ${{ fromJSON(needs.get-container.outputs.flavors) }}
steps:
@ -52,11 +52,8 @@ jobs:
- uses: vmware-labs/vmware-image-builder-action@main
name: Verify ${{ needs.get-container.outputs.container }}
with:
pipeline: vib-scheduled-verify.json
pipeline: vib-verify.json
env:
# This workflow is not triggered by any git event. Instead of using SHA_ARCHIVE we are
# setting directly the main branch url.
VIB_ENV_URL: https://api.github.com/repos/bitnami/containers/tarball/main
# Path with docker resources
VIB_ENV_PATH: ${{ matrix.flavor }}
# Container name

View File

@ -67,6 +67,7 @@ jobs:
if: ${{ needs.get-container.outputs.result == 'ok' && contains(github.event.pull_request.labels.*.name, 'verify') }}
name: Verify
strategy:
fail-fast: false
matrix:
flavor: ${{ fromJSON(needs.get-container.outputs.flavors) }}
steps:

View File

@ -1,47 +0,0 @@
{
"context": {
"resources": {
"url": "{VIB_ENV_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
}
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "warning"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": [
"OS"
],
"application": {
"kind": "CONTAINER_IMAGE"
}
}
}
]
}
}
}