Update downstream #18
Workflow file for this run
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: Update downstream | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
update-downstream-repos: | |
environment: detsys-pr-bot | |
name: Pull request detsys-ts update to ${{ github.repository_owner }}/${{ matrix.repo }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
repo: | |
- flake-checker-action | |
- magic-nix-cache-action | |
#- flakehub-push | |
#- flakehub-mirror | |
#- nix-installer-action | |
#- update-flake-lock | |
env: | |
REF: ${{ github.sha }} | |
REF_URL: https://github.com/${{ github.repository }}/tree/${{ github.sha }} | |
GIT_USER: ${{ github.actor }} | |
GIT_EMAIL: ${{ github.actor }}@users.noreply.github.com | |
GIT_BRANCH: detsys-ts-update-${{ github.sha }} | |
GIT_BASE: main | |
GIT_HEAD: detsys-pr-bot:detsys-ts-update-${{ github.sha }} | |
TARGET_REPO: ${{ github.repository_owner }}/${{ matrix.repo }} | |
SOURCE_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ secrets.detsys_pr_bot_token }} # for `gh pr create` | |
steps: | |
- name: Check out ${{ env.TARGET_REPO }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.TARGET_REPO }} | |
token: ${{ env.GH_TOKEN }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Set up Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Configure Git for ${{ env.GIT_USER }} | |
run: | | |
git config user.name "${{ env.GIT_USER }}" | |
git config user.email "${{ env.GIT_EMAIL }}" | |
- name: Update detsys-ts dependency for ${{ env.TARGET_REPO }} to ref ${{ env.REF }} | |
run: | | |
nix develop --command pnpm update detsys-ts | |
nix develop --command pnpm all | |
- name: Commit changes to package.json, pnpm-lock.yaml, and dist/ | |
run: | | |
gh repo fork | |
date > boop | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.detsys_pr_bot_token }} | |
title: "Update detsys-ts dependency and dist directory (trigged by ${{ env.SOURCE_REPO }})" | |
body: Bump detsys-ts to [${{ env.REF }}](${{ env.REF_URL }}) and regenerate application bundle. | |
push-to-fork: detsys-pr-bot/${{ matrix.repo }} | |
branch: "${{ env.GIT_BRANCH }}" | |
base: ${{ env.GIT_BASE }} | |
draft: false |