-
Notifications
You must be signed in to change notification settings - Fork 571
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
Make pre-release integration PRs #3370
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: PR to update Anchore dependencies | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
repos: | ||
description: "List of dependencies to update" | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'anchore' # only run for main repo (not forks) | ||
steps: | ||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1 | ||
|
||
- name: Bootstrap environment | ||
uses: ./.github/actions/bootstrap | ||
with: | ||
tools: false | ||
bootstrap-apt-packages: "" | ||
|
||
- name: Update dependencies | ||
id: update | ||
uses: anchore/workflows/.github/actions/update-go-dependency@add-dep-update | ||
with: | ||
repos: ${{ github.event.inputs.repos }} | ||
|
||
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.TOKEN_APP_ID }} | ||
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }} | ||
|
||
- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5 | ||
with: | ||
signoff: true | ||
delete-branch: true | ||
draft: ${{ steps.update.outputs.draft }} | ||
# do not change this branch, as other workflows depend on it | ||
branch: auto/integration | ||
labels: dependencies,pre-release | ||
commit-message: "chore(deps): update anchore dependencies" | ||
title: "chore(deps): update anchore dependencies" | ||
body: ${{ steps.update.outputs.changelog }} | ||
token: ${{ steps.generate-token.outputs.token }} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ vars: | |
ORAS: "{{ .TOOL_DIR }}/oras" | ||
YQ: "{{ .TOOL_DIR }}/yq" | ||
TASK: "{{ .TOOL_DIR }}/task" | ||
GH: "{{ .TOOL_DIR }}/gh" | ||
|
||
# used for changelog generation | ||
CHANGELOG: CHANGELOG.md | ||
|
@@ -132,6 +133,17 @@ tasks: | |
- "{{ .TMP_DIR }}" | ||
cmd: "mkdir -p {{ .TMP_DIR }}" | ||
|
||
## Dependency tasks ################################# | ||
|
||
update-anchore-dependencies: | ||
desc: Update Anchore dependencies | ||
deps: [tools] | ||
requires: | ||
vars: | ||
- FROM | ||
cmd: | | ||
{{ .GH }} workflow run update-anchore-dependencies.yml -f repos="github.com/anchore/stereoscope@{{ .FROM }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this task be used for anything? Generally, I think the dependencies would be updated by dependabot once an upstream project has a new version released. If I'm making a change in syft, here, I would be most interested in testing this specific change across the downstream projects, namely: Grype. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when there are releases, yes. But this is also used to control integration branches too (update to commits without releases), something that dependabot can't do. This mechanism would happen to be used for both integration and main though during release trains. |
||
|
||
## Static analysis tasks ################################# | ||
|
||
format: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this workflow just goes away, and there's a different workflow to run
grype/validations.yml
against a syft change in a syft PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to open these pre-release PRs as integration branches in all repos during a release day, starting with pointing at integration branches for all dependencies with the PR in a draft state, then once releases start (after all pre-release PRs are green) we bump all dependencies to released versions and promote the PR from draft to mergable.