chore(deps): update github/codeql-action digest to 294a9d9 (#268) #581
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: ci | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
types: | |
- "opened" | |
- "reopened" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Prepare | |
id: prep | |
run: | | |
echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3 | |
with: | |
install: true | |
version: latest | |
driver-opts: image=moby/buildkit:latest | |
- name: Build local image for scan and sbom | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 | |
with: | |
tags: localbuild/cloudflare-ddns:latest | |
push: false | |
load: true | |
- name: Scan image | |
id: scan | |
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4 | |
with: | |
image: localbuild/cloudflare-ddns:latest | |
fail-build: true | |
severity-cutoff: critical | |
- name: Create SBOM | |
uses: anchore/sbom-action@61119d458adab75f756bc0b9e4bde25725f86a7a # v0 | |
with: | |
format: spdx-json | |
output-file: "${{ github.event.repository.name }}-sbom.spdx.json" | |
- name: Scan SBOM | |
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4 | |
with: | |
sbom: "${{ github.event.repository.name }}-sbom.spdx.json" | |
- name: Upload Anchore scan SARIF report | |
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} | |
- name: Login to GitHub Container Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push | |
if: github.event_name != 'pull_request' | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/cloudflare-ddns:${{ steps.prep.outputs.VERSION }} | |