diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e04449..88bd706 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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: | @@ -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 \ No newline at end of file