Update tasks.yml - tasks.get should use id, otherwise use tasks.list #214
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
name: report | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * 1" | |
push: | |
branches: | |
- main | |
- 8.x | |
jobs: | |
generate_report: | |
runs-on: ubuntu-latest | |
env: | |
STACK_VERSION: 9.1.0-SNAPSHOT | |
BRANCH: 'main' # Branch for downloading the specs | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
ref: ${{ env.BRANCH }} | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
- name: Build | |
run: | | |
cd report && bundle install | |
echo "REPORT_DATE=`date "+%Y-%m-%d|%H:%M:%S"`" >> $GITHUB_ENV | |
- name: Download Artifacts | |
run: cd report && bundle exec rake download_all | |
- name: Generate report | |
run: cd report && bundle exec rake report | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
id: cpr | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Updates API report ${{env.REPORT_DATE}} ${{ env.BRANCH }} | |
branch: update_report_${{ env.BRANCH }} | |
title: Updates API report ${{ env.BRANCH }} | |
body: 'As titled' | |
base: ${{ env.BRANCH }} | |
committer: 'Elastic Machine <elasticmachine@users.noreply.github.com>' | |
author: 'Elastic Machine <elasticmachine@users.noreply.github.com>' | |
- name: Pull Request Summary | |
if: ${{ steps.cpr.outputs.pull-request-url }} | |
run: | | |
echo "${{ env.BRANCH }} - ${{ steps.cpr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY |