Skip to content

Update Briefcase

Update Briefcase #50

name: Update Briefcase
on:
workflow_dispatch:
push:
branches:
- main
paths:
- src/pkgs/**
jobs:
update-briefcase:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Compile Briefcase
run: |
forge --version
forge install
./script/util/create_briefcase.sh
- name: Check for Changes
id: git-check
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changes=changes present" >> $GITHUB_OUTPUT
else
echo "changes=" >> $GITHUB_OUTPUT
fi
- name: Setup SSH
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Commit and Push if changes are present
if: steps.git-check.outputs.changes != ''
run: |
git remote set-url origin [email protected]:${{ github.repository }}.git
git add .
git commit -m "Update briefcase"
git push