Skip to content

Gen Latest Dev Snapshot - MCE 2.8 #225

Gen Latest Dev Snapshot - MCE 2.8

Gen Latest Dev Snapshot - MCE 2.8 #225

name: Gen Latest Dev Snapshot - MCE 2.8
on:
workflow_dispatch: {}
schedule:
- cron: '0 7 * * *' # 3:00AM EST every day (UTC-4) - 2 hours after 2.15
- cron: '0 13 * * *' # 9:00AM EST every day (UTC-4) - 2 hours after 2.15
- cron: '0 21 * * *' # 5:00PM EST every day (UTC-4) - 2 hours after 2.15
- cron: '0 1 * * *' # 9:00PM EST every day (UTC-4) - 2 hours before 2.15
jobs:
snapshot:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: ['backplane-2.8']
include:
- branch: backplane-2.8
release-plan: "dev-publish-mce-28"
steps:
- name: Checkout tooling branch
uses: actions/checkout@v3
with:
ref: tooling
# Run the snapshot collector script and create a PR with the latest snapshot in the correct branch
- name: Run snapshot collection and file handling
env:
SA_TOKEN: ${{ secrets.KONFLUX_SERVICE_ACCOUNT_TOKEN }}
run: |
chmod +x snapshot-collector.sh
./snapshot-collector.sh ${{ matrix.release-plan }} "$SA_TOKEN"
- name: Generate GitHub token for workflow actions
id: gen-workflow-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.WORKFLOW_BOT_APP_ID }}
private-key: ${{ secrets.WORKFLOW_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
# Create Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: "update-snapshot-${{ matrix.branch }}"
base: "${{ matrix.branch }}"
delete-branch: true
title: "Gen Latest Snapshot [${{ matrix.branch }}]"
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
token: ${{ steps.gen-workflow-token.outputs.token }}