Skip to content

Commit

Permalink
Revert "Uploading sbom" (#37)
Browse files Browse the repository at this point in the history
* Revert "test uploading sbom (#36)"

This reverts commit 8257b14.

* Apply suggestions from code review
  • Loading branch information
tjololo authored Dec 15, 2023
1 parent 8257b14 commit b731941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ jobs:
run: |
curl -L https://github.com/google/ko/releases/download/v${{ env.ko_version }}/ko_${{ env.ko_version }}_Linux_x86_64.tar.gz | tar xzf - ko
chmod +x ./ko
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Authenticate with Google Cloud
id: auth
uses: google-github-actions/auth@v2
Expand All @@ -90,5 +86,4 @@ jobs:
KO_DOCKER_REPO: europe-north1-docker.pkg.dev/cloud-418/mope
run: |
./ko login europe-north1-docker.pkg.dev --username oauth2accesstoken --password ${{ steps.auth.outputs.access_token }}
FINAL_IMAGE=$(./ko build -B --sbom-dir .sbom/ .)
gcloud artifacts sbom load --source .sbom/mope-linux-amd64.spdx.json --uri $FINAL_IMAGE
./ko build -B .
14 changes: 2 additions & 12 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ jobs:
KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}
run: |
./ko login ghcr.io --username $GITHUB_REPOSITORY_OWNER --password ${{ secrets.GITHUB_TOKEN }}
./ko publish -B --tags ${{ steps.version.outputs.tag }} --sbom-dir .sbom .
- uses: anchore/sbom-action/publish-sbom@v0
with:
sbom-artifact-match: "\\.sbom\\/.*\\.spdx\\.json$"

./ko build -B --tags ${{ steps.version.outputs.tag }} .
publish_google:
name: Build latest and publish to pkg.dev
runs-on: ubuntu-latest
Expand Down Expand Up @@ -75,10 +71,6 @@ jobs:
run: |
curl -L https://github.com/google/ko/releases/download/v${{ env.ko_version }}/ko_${{ env.ko_version }}_Linux_x86_64.tar.gz | tar xzf - ko
chmod +x ./ko
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Authenticate with Google Cloud
id: auth
uses: google-github-actions/auth@v2
Expand All @@ -93,9 +85,7 @@ jobs:
KO_DOCKER_REPO: europe-north1-docker.pkg.dev/cloud-418/mope
run: |
./ko login europe-north1-docker.pkg.dev --username oauth2accesstoken --password ${{ steps.auth.outputs.access_token }}
FINAL_IMAGE=$(./ko publish -B --sbom-dir .sbom/ --tags ${{ steps.version.outputs.tag }} .)
gcloud artifacts sbom load --source .sbom/mope-linux-amd64.spdx.json --uri $FINAL_IMAGE
./ko build -B --tags ${{ steps.version.outputs.tag }} .
- name: Authenticate with Google Cloud
id: runauth
uses: google-github-actions/auth@v2
Expand Down

0 comments on commit b731941

Please sign in to comment.