Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set repository name lowercase
id: repo
run: echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT

- name: Run Semgrep security scan
run: |
pip install semgrep
Expand Down Expand Up @@ -104,7 +108,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
images: ghcr.io/${{ steps.repo.outputs.name }}
tags: |
type=sha
type=ref,event=branch
Expand All @@ -128,7 +132,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.35.0
with:
image-ref: ghcr.io/${{ github.repository }}:sha-${{ steps.vars.outputs.short_sha }}
image-ref: ghcr.io/${{ steps.repo.outputs.name }}:sha-${{ steps.vars.outputs.short_sha }}
format: json
output: trivy-results.json
severity: CRITICAL,HIGH,MEDIUM,LOW
Expand Down Expand Up @@ -156,7 +160,7 @@ jobs:
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
helm package chart/
CHART_VERSION=$(grep '^version:' chart/Chart.yaml | awk '{print $2}')
helm push isms-builder-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository }}
helm push isms-builder-${CHART_VERSION}.tgz oci://ghcr.io/${{ steps.repo.outputs.name }}/charts

- name: Make packages public
run: |
Expand All @@ -169,5 +173,5 @@ jobs:
curl -X PATCH \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user/packages/container/isms-builder%2Fisms-builder/versions \
https://api.github.com/user/packages/container/isms-builder%2Fcharts%2Fisms-builder/versions \
-d '{"visibility":"public"}' || true
Loading