Skip to content

Commit

Permalink
Merge tag 'v0.10.2' into merge-upstream-10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyd450 committed Jun 5, 2024
2 parents 2be9c55 + 537cd20 commit c25bf50
Show file tree
Hide file tree
Showing 25 changed files with 754 additions and 465 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/auto-merge-deps.yml

This file was deleted.

27 changes: 12 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@ name: CI

on:
push:
branches: ['main']
branches: ["main"]
pull_request:
branches: ['main']
branches: ["main"]
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
check-latest: true
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: "1.22"
check-latest: true

- name: Build
run: make build-all
- name: Build
run: make build-all

- name: Unit Tests
run: make unit-test

- name: Live dependency tests
run: make e2e-test
- name: Unit Tests
run: make unit-test
27 changes: 15 additions & 12 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: E2E
on:
push:
pull_request_target:
branches: ['main']
branches: ["main"]
workflow_dispatch:

jobs:
e2e:
runs-on: ubuntu-latest
permissions:
id-token: write # Enable OIDC
id-token: write # Enable OIDC

# The rest of these are sanity-check settings, since I'm not sure if the
# org default is permissive or restricted.
Expand All @@ -28,12 +28,8 @@ jobs:
security-events: none
statuses: none

env:
# Output logs to file in case we need to inspect errors.
GITSIGN_LOG: "/tmp/gitsign.log"

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
# Use the merge commit if type is pull_request/pull_request_target,
# else use the default ref.
Expand All @@ -43,14 +39,21 @@ jobs:
# for the e2e tests, so insert our own logic here.
# This is effectively a ternary of the form ${{ <condition> && <true> || <false> }}.
# See https://docs.github.com/en/actions/learn-github-actions/expressions for more details.
ref: ${{ startsWith(github.event_name, 'pull_request') && format('refs/pull/{0}/merge', github.event.number) || github.ref }}
ref:
${{ startsWith(github.event_name, 'pull_request') &&
format('refs/pull/{0}/merge', github.event.number) || github.ref }}

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: "1.22"
check-latest: true

- name: e2e unit tests
run: |
set -e
make e2e-test
- name: Install Gitsign
run: |
set -e
Expand Down Expand Up @@ -121,9 +124,9 @@ jobs:
run: |
set -e
# Setup staging TUF root - https://github.com/sigstore/public-good-instance/blob/1023ed05b7a8cf28e6a7de73bf98dd5075d97858/playbooks/tuf.md#updating-tuf-metadata-for-staging
# Initialize with staging TUF root - https://github.com/sigstore/root-signing-staging
rm -rf ~/.sigstore
wget https://tuf-repo-cdn.sigstage.dev/root.json
wget -O root.json -U "gitsign e2e test" https://tuf-repo-cdn.sigstage.dev/4.root.json
gitsign initialize --mirror=https://tuf-repo-cdn.sigstage.dev --root=root.json
# Sign commit
Expand Down
42 changes: 28 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,48 @@ on:
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for push images

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true

- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # v0.3

- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0

- uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 # v0.15.11

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"

- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- name: Login to GitHub Containers
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
cosign-release: 'v2.0.0' # optional
- uses: anchore/sbom-action/download-syft@b6a39da80722a2cb0ef5d197531764a89b5d48c3 # v0.15.8
- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KO_DOCKER_REPO: ghcr.io/sigstore/gitsign

- name: sign image
run: |
digest=$(crane digest ghcr.io/sigstore/gitsign:${{ env.RELEASE_VERSION }})
cosign sign "ghcr.io/sigstore/gitsign@${digest}"
env:
COSIGN_YES: true
16 changes: 8 additions & 8 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ jobs:
validate-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true

- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- uses: anchore/sbom-action/download-syft@b6a39da80722a2cb0ef5d197531764a89b5d48c3 # v0.15.8
- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
- uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 # v0.15.11
- uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
version: latest
args: release --clean --snapshot --skip-sign
args: release --clean --snapshot --skip=sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 11 additions & 11 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: license boilerplate check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
- name: Install addlicense
run: go install github.com/google/[email protected]
Expand All @@ -33,25 +33,25 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
timeout-minutes: 5
with:
version: v1.54
version: v1.57

generate-docs:
name: generate-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
- name: Check CLI docs are up to date
run: ./hack/presubmit.sh
Loading

0 comments on commit c25bf50

Please sign in to comment.