This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
upgrade-acceptance #436
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
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". | |
name: upgrade-acceptance | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
upgrade: | |
name: Upgrade | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
outputs: | |
patch_created: ${{ steps.create_patch.outputs.patch_created }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: acceptance | |
- name: Setup cfn-lint | |
uses: scottbrenner/cfn-lint-action@v2 | |
- name: Install dependencies | |
run: yarn install --check-files --frozen-lockfile | |
- name: Upgrade dependencies | |
run: npx projen upgrade | |
- name: Find mutations | |
id: create_patch | |
run: |- | |
git add . | |
git diff --staged --patch --exit-code > repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT | |
working-directory: ./ | |
- name: Upload patch | |
if: steps.create_patch.outputs.patch_created | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: repo.patch | |
path: repo.patch | |
overwrite: true | |
pr: | |
name: Create Pull Request | |
needs: upgrade | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.upgrade.outputs.patch_created }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: acceptance | |
- name: Download patch | |
uses: actions/download-artifact@v4 | |
with: | |
name: repo.patch | |
path: ${{ runner.temp }} | |
- name: Apply patch | |
run: '[ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping."' | |
- name: Set git identity | |
run: |- | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PROJEN_GITHUB_TOKEN }} | |
commit-message: |- | |
chore(deps): upgrade dependencies | |
Upgrades project dependencies. See details in [workflow run]. | |
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
------ | |
*Automatically created by projen via the "upgrade-acceptance" workflow* | |
branch: github-actions/upgrade-acceptance | |
title: "chore(deps): upgrade dependencies" | |
labels: auto-merge | |
body: |- | |
Upgrades project dependencies. See details in [workflow run]. | |
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
------ | |
*Automatically created by projen via the "upgrade-acceptance" workflow* | |
author: github-actions <github-actions@github.com> | |
committer: github-actions <github-actions@github.com> | |
signoff: true |