Skip to content

Commit

Permalink
Fix bad substitution and reduce more calls
Browse files Browse the repository at this point in the history
relates to #1766
  • Loading branch information
mauromorales committed Aug 28, 2023
1 parent 3647d96 commit c1f607d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ jobs:
- name: Convert all json files into a reports.tar.gz file
run: |
export VERSION=$(cat build/VERSION)
sudo tar cvf kairos-core-${matrix.flavor}-arm64-${matrix.model}-${VERSION}-scan-reports.tar.gz build/*.json
cd build
sudo tar cvf "kairos-core-${{matrix.flavor}}-arm64-${{matrix.model}}-${VERSION}-scan-reports.tar.gz" *.json
- name: Push 🔧
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand Down Expand Up @@ -275,7 +276,8 @@ jobs:
- name: Convert all json files into a reports.tar.gz file
run: |
export VERSION=$(cat build/VERSION)
sudo tar cvf kairos-standard-${matrix.flavor}-arm64-${matrix.model}-${VERSION}-scan-reports.tar.gz build/*.json
cd build
sudo tar cvf "kairos-standard-${{matrix.flavor}}-arm64-${{matrix.model}}-${VERSION}-scan-reports.tar.gz" *.json
- name: Push 🔧
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,24 @@ jobs:
filename=$(ls release/*.iso.sha256)
cosign sign-blob --yes --output-certificate="${filename}.pem" \
--output-signature="${filename}.sig" "${filename}"
- name: Prepare files for release
run: |
export VERSION=$(cat build/VERSION)
mkdir sarif
mv release/*.sarif sarif/
mkdir reports
mv release/*.json reports/
cd reports
sudo tar cvf "kairos-core-${{matrix.flavor}}-amd64-generic-${VERSION}-scan-reports.tar.gz" *.json
mv *.tar.gz ../release/
cd ..
rm release/VERSION release/IMAGE release/versions.yaml
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/*
- name: Prepare sarif files 🔧
run: |
mkdir sarif
mv release/*.sarif sarif/
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -278,6 +286,18 @@ jobs:
run: |
earthly +all -VARIANT=standard -K3S_VERSION=${{ matrix.k3s_version }} -FLAVOR=${{ matrix.flavor }}
sudo mv build release
- name: Prepare files for release
run: |
export VERSION=$(cat build/VERSION)
mkdir sarif
mv release/*.sarif sarif/
mkdir reports
mv release/*.json reports/
cd reports
sudo tar cvf "kairos-core-${{matrix.flavor}}-amd64-generic-${VERSION}-scan-reports.tar.gz" *.json
mv *.tar.gz ../release/
cd ..
rm release/VERSION release/IMAGE release/versions.yaml
- name: Push to quay
if: startsWith(github.ref, 'refs/tags/')
env:
Expand Down

0 comments on commit c1f607d

Please sign in to comment.