Skip to content

chore(ci): fix trivy scans by referencing workflow from main #61

chore(ci): fix trivy scans by referencing workflow from main

chore(ci): fix trivy scans by referencing workflow from main #61

Workflow file for this run

---
name: Release
on:
push:
branches:
- main
workflow_call:
secrets:
ADFINISBOT_PAT:
required: true
jobs:
semrel:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ secrets.ADFINISBOT_PAT }}
- name: Semantic Release
uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.ADFINISBOT_PAT }}
allow-initial-development-versions: true
- name: Adjust Versions
if: steps.semrel.outputs.version != ''
run: |
sed -r 's/"(0.0.0|latest)"/"${{ steps.semrel.outputs.version }}"/g' -i ./ember/package.json ./api/pyproject.toml ./charts/outdated/Chart.yaml
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: steps.semrel.outputs.version != ''
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
if: steps.semrel.outputs.version != ''
uses: docker/setup-buildx-action@v3
- name: Build and Push API Docker Image
if: steps.semrel.outputs.version != ''
uses: docker/build-push-action@v5
with:
context: ./api/
target: prod
push: true
tags: |
ghcr.io/${{ github.repository }}/api:${{ steps.semrel.outputs.version }}
ghcr.io/${{ github.repository }}/api:latest
- name: Build and Push Ember Docker Image
if: steps.semrel.outputs.version != ''
uses: docker/build-push-action@v5
with:
context: ./ember/
push: true
tags: |
ghcr.io/${{ github.repository }}/ember:${{ steps.semrel.outputs.version }}
ghcr.io/${{ github.repository }}/ember:latest
- name: Set up Helm
if: steps.semrel.outputs.version != ''
uses: azure/[email protected]
with:
version: v3.14.0
- name: Package Chart
if: steps.semrel.outputs.version != ''
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build charts/outdated
helm package --destination=dist charts/outdated
- name: Push Chart
if: steps.semrel.outputs.version != ''
run: helm push dist/*.tgz oci://ghcr.io/${{ github.repository }}/helm
trivy-scan-api:
runs-on: ubuntu-latest
if: always()
needs: semrel
steps:
- uses: ${{ github.repository }}/.github/workflows/trivy-scan.yaml@main

Check failure on line 90 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 90, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.repository .github/workflows/release.yaml (Line: 99, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.repository
with:
image-ref: api
trivy-scan-ember:
runs-on: ubuntu-latest
if: always()
needs: semrel
steps:
- uses: ${{ github.repository }}/.github/workflows/trivy-scan.yaml@main
with:
image-ref: ember