-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (69 loc) · 2.09 KB
/
podman-custom-runner.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Podman Custom Runner
on:
# push:
# branches:
# - main
# paths:
# - 'openshift/builds/podman/Dockerfile'
pull_request:
branches:
- 'main'
paths:
- 'openshift/builds/podman/Dockerfile'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
super-linter:
uses: ocpdude/actions-runner-controller/.github/workflows/super-linter.yaml@main
security-checks:
permissions:
contents: read
security-events: write
actions: read
runs-on: ubuntu-latest
needs: [ super-linter]
steps:
- uses: actions/checkout@v4
- name: Build the test image
working-directory: ./openshift/builds/podman/
run: docker build . --tag localbuild/testimage:latest
- name: Grype scan the test image
uses: anchore/scan-action@v3
id: scan
with:
image: "localbuild/testimage:latest"
fail-build: false
severity-cutoff: critical
- name: Upload vulnerability report
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
build-deployment:
needs: [ security-checks, super-linter]
runs-on: ubuntu-latest
steps:
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +'%m%d')"
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./openshift/builds/podman/
platforms: linux/amd64
push: true
tags: |
${{env.REGISTRY}}/ocpdude/podman-runner:${{ steps.date.outputs.date }}
${{env.REGISTRY}}/ocpdude/podman-runner:latest