-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch codecov uploads to use OIDC as tokenless is no-longer supported (
#276) (#278) * Switch codecov uploads to use OIDC as tokenless is no-longer supported Signed-off-by: Thomas Farr <[email protected]> * Only try to create scheduled test failure issues on main repo Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Thomas Farr <[email protected]> (cherry picked from commit 4528640) Co-authored-by: Thomas Farr <[email protected]>
- Loading branch information
1 parent
e6bfdb7
commit 27288ed
Showing
1 changed file
with
10 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ on: | |
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
|
@@ -55,6 +59,7 @@ jobs: | |
with: | ||
files: ./test_results/opensearch.lcov | ||
flags: unit | ||
use_oidc: true | ||
|
||
- name: Save OpenSearch logs | ||
if: failure() | ||
|
@@ -112,6 +117,7 @@ jobs: | |
with: | ||
files: ./client/test_results/opensearch.lcov | ||
flags: integration | ||
use_oidc: true | ||
|
||
- name: Save OpenSearch logs | ||
if: failure() | ||
|
@@ -135,7 +141,7 @@ jobs: | |
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/[email protected] | ||
if: github.event_name == 'schedule' | ||
if: github.event_name == 'schedule' && github.repository == 'opensearch-project/opensearch-rs' | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
@@ -203,9 +209,11 @@ jobs: | |
OPENSEARCH_PASSWORD: ${{ steps.opensearch.outputs.admin_password }} | ||
|
||
- uses: codecov/codecov-action@v4 | ||
if: github.event_name != 'schedule' | ||
with: | ||
files: ./client/test_results/opensearch.lcov | ||
flags: integration | ||
use_oidc: true | ||
|
||
- name: Save OpenSearch logs | ||
if: failure() | ||
|
@@ -216,7 +224,7 @@ jobs: | |
opensearch-*/logs/* | ||
- name: Create issue about failure | ||
if: failure() && github.event_name == 'schedule' | ||
if: failure() && github.event_name == 'schedule' && github.repository == 'opensearch-project/opensearch-rs' | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token }} | ||
|