-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): handle concurrency with github actions (#6798)
Closes [DINF-644](https://linear.app/sourcegraph/issue/DINF-644/improve-github-actions-concurrency-in-cody-repo) This helps save some GitHub action minutes by ensuring we kill previous jobs belonging to the same workflow. ## Test plan CI ## Changelog
- Loading branch information
1 parent
ca3fcd1
commit 0e4c3e8
Showing
20 changed files
with
129 additions
and
47 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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ on: | |
issues: | ||
types: [opened, edited] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
issues: write | ||
contents: read | ||
|
@@ -11,9 +15,9 @@ jobs: | |
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: github/[email protected] | ||
with: | ||
configuration-path: .github/labeler.yml | ||
enable-versioned-regex: 0 | ||
repo-token: ${{ github.token }} | ||
include-title: 1 | ||
- uses: github/[email protected] | ||
with: | ||
configuration-path: .github/labeler.yml | ||
enable-versioned-regex: 0 | ||
repo-token: ${{ github.token }} | ||
include-title: 1 |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
name: 'Close stale issues and PRs' | ||
name: "Close stale issues and PRs" | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
- cron: "30 1 * * *" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
stale-issue-message: 'This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.' | ||
stale-pr-message: 'This PR is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.' | ||
stale-issue-message: "This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days." | ||
stale-pr-message: "This PR is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days." | ||
days-before-stale: 60 | ||
days-before-close: 5 | ||
exempt-issue-labels: 'neverstale' | ||
exempt-pr-labels: 'neverstale' | ||
exempt-issue-labels: "neverstale" | ||
exempt-pr-labels: "neverstale" |
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
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ name: vscode-insiders-release | |
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'sourcegraph/cody' | ||
|
@@ -37,11 +41,11 @@ jobs: | |
GITHUB_ENV: $GITHUB_ENV | ||
- name: Authenticate to Google Cloud | ||
id: auth | ||
uses: 'google-github-actions/auth@v2' | ||
uses: "google-github-actions/auth@v2" | ||
with: | ||
project_id: 'cody-core-dev' | ||
workload_identity_provider: 'projects/39257127245/locations/global/workloadIdentityPools/github/providers/cody' | ||
service_account: '[email protected]' | ||
project_id: "cody-core-dev" | ||
workload_identity_provider: "projects/39257127245/locations/global/workloadIdentityPools/github/providers/cody" | ||
service_account: "[email protected]" | ||
create_credentials_file: true | ||
export_environment_variables: true | ||
- run: CODY_RELEASE_TYPE=insiders pnpm -C vscode run release | ||
|
@@ -54,7 +58,7 @@ jobs: | |
run: | | ||
# Compute the current date | ||
current_date=$(date +'%Y-%m-%d') | ||
# Now create the JSON and insert into BigQuery | ||
echo "{\"release_version\": \"${{ steps.create_release.outputs.version_tag }}\", \"extension_bundle_size_mb\": $EXTENSION_BUNDLE_SIZE_MB, \"webview_bundle_size_mb\": $WEBVIEW_BUNDLE_SIZE_MB, \"date\": \"$current_date\"}" > data.json | ||
bq load \ | ||
|
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