Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor release job #986

Merged
merged 2 commits into from
Mar 17, 2023
Merged

refactor release job #986

merged 2 commits into from
Mar 17, 2023

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Mar 14, 2023

  • add tag name to the provenance
  • refactor release job
  • update deprecated Goreleaser flags
  • and other cosmetic updates

Rehearsal here: https://github.com/cpanato/ko/actions/runs/4416634779 / https://github.com/cpanato/ko/releases/tag/v99.99.02

Image:

$ cosign verify --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/cpanato/ko/.github/workflows/release.yml@refs/tags/v99.99.02" ghcr.io/cpanato/ko:v99.99.02 | jq .

Verification for ghcr.io/cpanato/ko:v99.99.02 --
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - Existence of the claims in the transparency log was verified offline
  - The code-signing certificate was verified using trusted certificate authority certificates
[
  {
    "critical": {
      "identity": {
        "docker-reference": "ghcr.io/cpanato/ko"
      },
      "image": {
        "docker-manifest-digest": "sha256:4063bcc4092a5122926b9dfc53cb63d562c335594ab7c358cca9cde6f00537ab"
      },
      "type": "cosign container image signature"
    },
    "optional": {
      "1.3.6.1.4.1.57264.1.1": "https://token.actions.githubusercontent.com",
      "1.3.6.1.4.1.57264.1.2": "push",
      "1.3.6.1.4.1.57264.1.3": "6ce8a434b794b79fe831727f2c308a39c5ba6acb",
      "1.3.6.1.4.1.57264.1.4": "goreleaser",
      "1.3.6.1.4.1.57264.1.5": "cpanato/ko",
      "1.3.6.1.4.1.57264.1.6": "refs/tags/v99.99.02",
      "Bundle": {
        "SignedEntryTimestamp": "MEQCIB78uc7Dp23sau4pwR0o8PHAQViEnNMK2kz1pQyyFBK3AiBXiKiQd9tkC9AU6ZJ+ITnxdZFV2b8pNQIDa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UJaVUZDTWtGT01EbE5SM0pIZUhoRmVWbDRhMlZJU214dVRuZExhVk5zTmpRemFubDBMelJsUzJOdlFYWkxaVFpQUVVGQlFtaDFRamsyVlZWQkNrRkJVVVJCUldOM1VsRkpaMHh5ZFdKcFdYVjViRk5LUkdoc1MwNXFSakZhVUVwb2JUWkJTbTA1VjFoTVJsRkJlRFZ1ZWtGM1pGRkRTVkZEV205cE1HVUtWMlJKVXpFemQwRm9Na2RuUkdjeU1ubEhPV3N5UWtoeFRqRlJTeXN3YjNCSVFsZGxkbFJCUzBKblozRm9hMnBQVUZGUlJFRjNUbkJCUkVKdFFXcEZRUW9yT1doMWRFWkZUWGxTTW1OTFptNVdjbGRxWkhBd2JqSmFOakJuTVZrMFlVaHViMmxtYkRRd1lYVklWV292ZG5JMmRtWm9TelZTZWs0d1dqQTRaakZPQ2tGcVJVRnJUMmhwY0cweWNGRm9NRFZrYVRGc01XTm1jbTVsZEVwMVVXSTBTVzFyVW1kaGJtWlliR1p2TUN0eVRUY3lVM0JtV0VsTlZXUXlOMjl6VTBNS05qZFViUW90TFMwdExVVk9SQ0JEUlZKVVNVWkpRMEZVUlMwdExTMHRDZz09In19fX0=",
          "integratedTime": 1678803594,
          "logIndex": 15405023,
          "logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
        }
      },
      "GIT_HASH": "6ce8a434b794b79fe831727f2c308a39c5ba6acb",
      "GIT_TAG": "v99.99.02",
      "Issuer": "https://token.actions.githubusercontent.com",
      "RUN_ATTEMPT": "1",
      "RUN_ID": "4416634779",
      "Subject": "https://github.com/cpanato/ko/.github/workflows/release.yml@refs/tags/v99.99.02",
      "githubWorkflowName": "goreleaser",
      "githubWorkflowRef": "refs/tags/v99.99.02",
      "githubWorkflowRepository": "cpanato/ko",
      "githubWorkflowSha": "6ce8a434b794b79fe831727f2c308a39c5ba6acb",
      "githubWorkflowTrigger": "push"
    }
  }
]

@cpanato cpanato force-pushed the fix-provencance branch 2 times, most recently from 535c7d8 to 4111de2 Compare March 14, 2023 14:33
scripts/builld-sign-release-images.sh Outdated Show resolved Hide resolved
.goreleaser.yml Outdated Show resolved Hide resolved
.goreleaser.yml Outdated Show resolved Hide resolved
.goreleaser.yml Outdated Show resolved Hide resolved
@cpanato cpanato force-pushed the fix-provencance branch 4 times, most recently from 27e7b01 to 2cf5658 Compare March 14, 2023 17:46
@cpanato
Copy link
Member Author

cpanato commented Mar 14, 2023

ok, forgot that now Goreleaser can build using ko :) (just not signing for now, but it is a great step)

here is the new rehearsal: https://github.com/cpanato/ko/actions/runs/4418689179/jobs/7746132525 / https://github.com/cpanato/ko/releases/tag/v99.99.06

$ cosign verify --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/cpanato/ko/.github/workflows/release.yml@refs/tags/v99.99.06" ghcr.io/cpanato/ko:v99.99.06 | jq .

Verification for ghcr.io/cpanato/ko:v99.99.06 --
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - Existence of the claims in the transparency log was verified offline
  - The code-signing certificate was verified using trusted certificate authority certificates
[
  {
    "critical": {
      "identity": {
        "docker-reference": "ghcr.io/cpanato/ko"
      },
      "image": {
        "docker-manifest-digest": "sha256:b66800750a3fd0d15a880fffa33027de82ae19ce2266f5c3798f7fd42b87ccc6"
      },
      "type": "cosign container image signature"
    },
    "optional": {
      "1.3.6.1.4.1.57264.1.1": "https://token.actions.githubusercontent.com",
      "1.3.6.1.4.1.57264.1.2": "push",
      "1.3.6.1.4.1.57264.1.3": "2cf56584529e089c558b82627ec828d80e23eb9d",
      "1.3.6.1.4.1.57264.1.4": "goreleaser",
      "1.3.6.1.4.1.57264.1.5": "cpanato/ko",
      "1.3.6.1.4.1.57264.1.6": "refs/tags/v99.99.06",
      "Bundle": {
        "SignedEntryTimestamp": "MEYCIQCctz8jUIFhgA2AZ/8RfLV8zEeJi+xa1q8zKSd/Ki90fgIhAP/ex/D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kbFVVbEZRV2RTT1FwQ1NITkJaVkZDTTBGT01EbE5SM0pIZUhoRmVWbDRhMlZJU214dVRuZExhVk5zTmpRemFubDBMelJsUzJOdlFYWkxaVFpQUVVGQlFtaDFSa2x4YmxsQkNrRkJVVVJCUldkM1VtZEphRUZKYjNabFluZ3JNbTg1VlZjeWN6aEJaMlI1ZFZSS1JVNTBVRkF2TTFwWWQyYzJiRlV6TUM5VFkxaEhRV2xGUVc5dmJrUUtZa1l2WlhaS0wyRmtTamhHVEZwaGJ6TmFaR05SU0d0NlRVOVVXRlZqZVhCSE5YRlZTbHBCZDBObldVbExiMXBKZW1vd1JVRjNUVVJoUVVGM1dsRkplQXBCU2xCU1NYQkpSRlJMYkZGa1l6TXpiR28zSzFJeFkxZE9XVTQyUldWNVNreHFRMWxtYWprM2FGUnZRbHBaTkV4TVNFOXpkbEo1TTIxTVp6bEpNbWRTQ2pKQlNYZE5XV0pXTlZJeWNtZFNTa3hLYzNCNlNGUXpVQ3RxTTNKRFJqRXJhRU5UWlhCVFUwVTJlbk5EVGpJMldubDRRVmsyWldOc2FYbFNSMVJIT1VZS1JqaEpNQW90TFMwdExVVk9SQ0JEUlZKVVNVWkpRMEZVUlMwdExTMHRDZz09In19fX0=",
          "integratedTime": 1678816882,
          "logIndex": 15418491,
          "logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
        }
      },
      "GIT_HASH": "2cf56584529e089c558b82627ec828d80e23eb9d",
      "GIT_TAG": "v99.99.06",
      "Issuer": "https://token.actions.githubusercontent.com",
      "RUN_ATTEMPT": "1",
      "RUN_ID": "4418689179",
      "Subject": "https://github.com/cpanato/ko/.github/workflows/release.yml@refs/tags/v99.99.06",
      "githubWorkflowName": "goreleaser",
      "githubWorkflowRef": "refs/tags/v99.99.06",
      "githubWorkflowRepository": "cpanato/ko",
      "githubWorkflowSha": "2cf56584529e089c558b82627ec828d80e23eb9d",
      "githubWorkflowTrigger": "push"
    }
  }
]

@cpanato cpanato requested a review from imjasonh March 14, 2023 18:03
scripts/build-sign-release-images.sh Outdated Show resolved Hide resolved
.goreleaser.yml Outdated Show resolved Hide resolved
@cpanato cpanato force-pushed the fix-provencance branch 2 times, most recently from 55d426c to 5578a57 Compare March 14, 2023 18:27
@cpanato
Copy link
Member Author

cpanato commented Mar 14, 2023

ok new one :)

https://github.com/cpanato/ko/actions/runs/4419196873/jobs/7747315185 / https://github.com/cpanato/ko/releases/tag/v99.99.08

@imjasonh imjasonh merged commit deb13d7 into ko-build:main Mar 17, 2023
@cpanato cpanato deleted the fix-provencance branch March 17, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants