Skip to content

chore(deps): update github/codeql-action action to v4 #538

chore(deps): update github/codeql-action action to v4

chore(deps): update github/codeql-action action to v4 #538

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
permissions:
contents: write
packages: write
pull-requests: write
security-events: write
env:
APP_NAME: github-actions-runner
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout ๐Ÿ””
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Docker Buildx ๐Ÿ–ฅ๏ธ
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
- name: Build Container ๐Ÿ—๏ธ
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
context: .
push: false
release:
name: Release
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs:
- build_and_test
outputs:
skipped: ${{ steps.changelog.outputs.skipped }}
tag: ${{ steps.changelog.outputs.tag }}
clean_changelog: ${{ steps.changelog.outputs.clean_changelog }}
version: ${{ steps.changelog.outputs.version }}
steps:
- name: Generate GitHub App Token ๐Ÿช™
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
id: generate-token
with:
app_id: ${{ secrets.BRAID_BOT_APP_ID }}
private_key: ${{ secrets.BRAID_BOT_PRIVATE_KEY }}
- name: Checkout ๐Ÿ””
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.head_ref }}
token: ${{ steps.generate-token.outputs.token }}
- name: Conventional Changelog Action ๐Ÿ“‹
id: changelog
uses: TriPSs/conventional-changelog-action@3c4970b6573374889b897403d2f1278c395ea0df # v5
with:
github-token: ${{ steps.generate-token.outputs.token }}
git-user-name: "braid-bot[bot]"
git-user-email: "169546839+braid-bot[bot]@users.noreply.github.com"
skip-on-empty: "false"
release-count: 10
version-file: package.yaml
create-summary: true
- name: Generate Release ๐Ÿ“ฆ
if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2
with:
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
generate_release_notes: true
body: ${{ steps.changelog.outputs.clean_changelog }}
publish:
name: Publish
if: github.event_name != 'pull_request' && needs.release.outputs.skipped == 'false'
runs-on: ubuntu-latest
needs:
- release
steps:
- name: Checkout ๐Ÿ””
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Login to GitHub Container Registry ๐Ÿ”“
if: github.event_name != 'pull_request'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata ๐Ÿท๏ธ
id: meta
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}
tags: |
latest
${{ needs.release.outputs.version}}
${{ github.sha }}
- name: Setup QEMU ๐Ÿ–ฅ๏ธ
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Setup Docker Buildx ๐Ÿ–ฅ๏ธ
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
- name: Build and push ๐Ÿ—๏ธ
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
context: .
platforms: linux/amd64,linux/arm64
provenance: false
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Run Trivy Vulnerability Scanner ๐Ÿฐ
uses: aquasecurity/trivy-action@master
with:
image-ref: ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}:${{ github.sha }}
format: 'sarif'
output: 'trivy-results.sarif'
vuln-type: 'os,library'
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab ๐Ÿ“ฎ
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4
with:
sarif_file: 'trivy-results.sarif'