-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.61 KB
/
scan.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
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: '30 9,15,21,3 * * *'
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Homebrew/actions/setup-homebrew@master
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install tools
run: brew install trivy grype ocicl sqlite && ocicl setup > ~/.sbclrc && ocicl install
shell: bash
- name: Generate scan results
run: |
echo ${{ github.token }} | oras login ghcr.io -u ${{ github.actor }} --password-stdin
mkdir ./_site
echo ${{ secrets.REDHAT_PASSWORD }} | docker login -u="${{ secrets.REDHAT_USERNAME }}" --password-stdin registry.redhat.io
echo ${{ secrets.REDHAT_PASSWORD }} | podman login -u="${{ secrets.REDHAT_USERNAME }}" --password-stdin registry.redhat.io
./run.sh
cp index.html ./_site
shell: bash
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4