Skip to content

Release at 5 in the morning #68

Release at 5 in the morning

Release at 5 in the morning #68

Workflow file for this run

name: Release at 5 in the morning
on:
schedule:
- cron: '0 3 * * 0' # This runs the workflow weekly at 3:00 GMT on Sunday
workflow_dispatch:
jobs:
check_issue:
runs-on: ubuntu-latest
outputs:
user_login: ${{ steps.issue.outputs.user_login }}
issue_number: ${{ steps.issue.outputs.issue_number }}
issue_title: ${{ steps.issue.outputs.issue_title }}
issue_body: ${{ steps.issue.outputs.issue_body }}
steps:
- name: Check for cprelease issue
id: issue
uses: actions/github-script@v3
with:
script: |
const issues = await github.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
per_page: 100
});
const issue = issues.data.find(issue => issue.title === 'cprelease');
if (issue) {
core.setOutput('user_login', issue.user.login);
core.setOutput('issue_number', issue.number);
core.setOutput('issue_title', issue.title);
core.setOutput('issue_body', issue.body);
} else {
core.setFailed('No issue with title "cprelease" found.');
}
cherry_pick:
needs: check_issue
if: needs.check_issue.result == 'success'
uses: untillpro/ci-action/.github/workflows/cp.yml@master
with:
org: 'ivvorg'
repo: 'public-test-repo'
team: 'DevOps_cp'
user: ${{ needs.check_issue.outputs.user_login }}
issue: ${{ needs.check_issue.outputs.issue_number }}
issue-title: ${{ needs.check_issue.outputs.issue_title }}
issue-body: ${{ needs.check_issue.outputs.issue_body }}
secrets:
git_token: ${{ secrets.REPOREADING_TOKEN }}