Skip to content

Update configs

Update configs #280

name: Auto update build plan
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
schedule:
# Every friday at 4 PM
- cron: "0 16 * * 5"
push:
paths:
- coordinator/**
jobs:
build-plan:
runs-on: ubuntu-22.04
if: github.repository == 'VirtusLab/community-build3' && contains(github.ref, 'master')
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Install coursier
uses: coursier/setup-action@v1
with:
apps: scala-cli:1.2.0
- name: Get Date
id: get-date
run: echo "week-start=$(date -dmonday +%Y%m%d)" >> $GITHUB_OUTPUT
# - name: Cache coordinator data
# uses: actions/cache@v3
# with:
# # coordinator stores cache in current working directory
# path: data/
# key: coordinator-data-cache-${{ steps.get-date.outputs.week-start}}
- name: Build plan
# Limit each build plan to at most 1000 most project.
# GitHub actions has problems when rendering workflow of more then 1k jobs
# Projects are grouped based on GitHub stars
run: scala-cli run coordinator/ -- 3 -1 -1 1000 "" coordinator/configs
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: "buildConfig"
path: |
.github/workflows/buildPlan*.yaml
.github/workflows/buildConfig.json
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: 303718
private_key: ${{ secrets.OPENCB_CONFIG_UPDATE_TOKEN }}
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: Update build config
assignees: WojciechMazur
branch: build/scheduled-update
branch-suffix: timestamp
delete-branch: true
title: "[Bot] Update build config"
draft: false
add-paths: |
.github/workflows/buildPlan*.yaml
.github/workflows/buildConfig.json