-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #492 from groldan/release/signed-images_1.8.x
Cosign integration. Docker images signature and validation in github actions
- Loading branch information
Showing
2 changed files
with
52 additions
and
4 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 |
---|---|---|
|
@@ -21,6 +21,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -31,16 +34,14 @@ jobs: | |
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
cache: 'maven' | ||
|
||
- name: Validate source code formatting | ||
run: make lint | ||
|
||
- name: Build without tests | ||
run: | | ||
make install | ||
|
@@ -57,3 +58,19 @@ jobs: | |
run: | | ||
rm -rf ~/.m2/repository/org/geoserver | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | ||
- name: Sign images | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
env: | ||
COSIGN_KEY: ${{ secrets.COSIGN_KEY }} | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
run: | | ||
make sign-image | ||
- name: Verify image signatures | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
env: | ||
COSIGN_PUB_KEY: ${{ secrets.COSIGN_PUB_KEY }} | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
run: | | ||
make verify-image |
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