-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add signing to action * add cosign pub key to README.md * add cosign to release * add CHANGELOG.md --------- Co-authored-by: Jörg Zimmermann <[email protected]>
- Loading branch information
Showing
5 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,10 +126,11 @@ jobs: | |
- name: Ensure logprep is available in image | ||
run: | | ||
docker run --rm ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }} --version | ||
# This step will build the image again, but every layer will already be cached, so it is nearly instantaneous. | ||
- name: Push image | ||
uses: docker/build-push-action@v5 | ||
uses: docker/build-push-action@v6 | ||
id: build-and-push | ||
with: | ||
context: . | ||
push: true | ||
|
@@ -138,7 +139,7 @@ jobs: | |
PYTHON_VERSION=${{ matrix.python-version }} | ||
tags: | | ||
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }} | ||
# To avoid the trivy-db becoming outdated, we save the cache for one day | ||
- name: Get date | ||
id: date | ||
|
@@ -151,7 +152,7 @@ jobs: | |
key: trivy-cache-${{ steps.date.outputs.date }} | ||
restore-keys: | ||
trivy-cache- | ||
|
||
- name: Scan image using Trivy | ||
uses: aquasecurity/[email protected] | ||
env: | ||
|
@@ -166,3 +167,16 @@ jobs: | |
# So we need to change the permissions before caching the database. | ||
- name: Change permissions for trivy.db | ||
run: sudo chmod 0644 ./cache/db/trivy.db | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
with: | ||
cosign-release: 'v2.4.1' | ||
|
||
- name: Sign image with a key | ||
run: | | ||
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }}@${DIGEST} | ||
env: | ||
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
DIGEST: ${{ steps.build-and-push.outputs.digest }} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,3 +90,16 @@ jobs: | |
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.ref_name }} | ||
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-stable | ||
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-latest | ||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
with: | ||
cosign-release: 'v2.4.1' | ||
|
||
- name: Sign image with a key | ||
run: | | ||
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }}@${DIGEST} | ||
env: | ||
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
DIGEST: ${{ steps.build-and-push.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters