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

chore: Adds scheduled runs for v1.5 release branch #483

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/1_5_scheduled_runs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release 1.5 scheduled CI

on:
schedule:
- cron: '0 2 * * *'

jobs:
codeql:
name: CodeQL Analysis
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
with:
branch-name: "v1.5"

lint-report:
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
with:
branch-name: "v1.5"

static-analysis:
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
with:
branch-name: "v1.5"

integration-test:
uses: ./.github/workflows/integration-tests.yaml
with:
branch-name: "v1.5"
secrets: inherit

create-issue:
runs-on: ubuntu-latest
if: ${{ always() && github.ref_name == 'v1.5' && contains(join(needs.*.result, ','), 'failure') }}
needs: [ lint-report, static-analysis, integration-test ]
steps:
- name: Check whether the issue already exists
id: check-issue
continue-on-error: true
run: |
if curl -L -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/$GITHUB_REPOSITORY/issues | grep "Release 1.5 - CI run failed"; then
echo ISSUE_EXISTS="True" >> $GITHUB_OUTPUT
else
echo ISSUE_EXISTS="False" >> $GITHUB_OUTPUT
fi
- name: Create issue
id: create-issue
if: steps.check-issue.outputs.ISSUE_EXISTS == 'False'
uses: dacbd/[email protected]
with:
token: ${{ github.token }}
title: "[sdcore-tests] Release 1.5 - CI run failed"
body: |
### Context
[Failed Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
[Codebase](https://github.com/${{ github.repository }}/tree/${{ github.sha }})

sync-issues:
if: always()
needs: [ create-issue ]
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
secrets: inherit