Skip to content

Merge pull request #48 from ParanoiHack/hotfix/build #37

Merge pull request #48 from ParanoiHack/hotfix/build

Merge pull request #48 from ParanoiHack/hotfix/build #37

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
branches:
- main
jobs:
ci:
name: CI
if: startsWith(github.ref, 'refs/tags/') && github.ref_type == 'tag'
uses: ./.github/workflows/ci.yml
secrets:
DD_URL: ${{ secrets.DD_URL }}
DD_ACCESS_TOKEN: ${{ secrets.DD_ACCESS_TOKEN }}
permissions:
contents: read
packages: read
build-and-push:
name: Build and Push Image
if: startsWith(github.ref, 'refs/tags/') && github.ref_type == 'tag'
needs: ci
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=tag
- name: Build and push Docker image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
KICS_VERSION=${{ vars.KICS_VERSION }}
OPENGREP_VERSION=${{ vars.OPENGREP_VERSION }}
GRYPE_VERSION=${{ vars.GRYPE_VERSION }}
SYFT_VERSION=${{ vars.SYFT_VERSION }}