Skip to content

.github/workflows/scan.yaml #868

.github/workflows/scan.yaml

.github/workflows/scan.yaml #868

Workflow file for this run

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