diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65c8da6..9ef8328 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,10 @@ jobs: push-ghcr: name: Build and push image runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + id-token: write strategy: fail-fast: false matrix: @@ -90,7 +94,21 @@ jobs: password: ${{ env.REGISTRY_PASSWORD }} extra-args: | --disable-content-trust - + # Sign container + - uses: sigstore/cosign-installer@main + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Sign container image + run: | + cosign sign ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS} + env: + TAGS: ${{ steps.push.outputs.digest }} + COSIGN_PRIVATE_KEY: ${{secrets.SIGNING_SECRET}} + COSIGN_EXPERIMENTAL: true - name: Echo outputs run: | echo "${{ toJSON(steps.push.outputs) }}" diff --git a/README.md b/README.md index 0e871eb..8504dd2 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,8 @@ The `latest` tag will automatically point to the latest build. - Core GNOME Applications installed from Flathub - GNOME Calculator, Calendar, Characters, Connections, Contacts, Evince, Firmware, Logs, Maps, NautilusPreviewer, TextEditor, Weather, baobab, clocks, eog, and font-viewer +## Verification +These images are signed with sisgstore's [cosign](https://docs.sigstore.dev/cosign/overview/). You can verify the signature by downloading the `cosign.pub` key from this repo and running the following command: + + cosign verify --key cosign.pub ghcr.io/ublue-os/base \ No newline at end of file