Skip to content

ci: other workflows can run after this #31

ci: other workflows can run after this

ci: other workflows can run after this #31

Workflow file for this run

name: Refresh Modpack File Index
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
refresh-modpack:
name: Refresh Modpack ${{ matrix.modpack }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
strategy:
matrix:
modpack:
- forgeworks
steps:
- name: Create App Token
uses: actions/create-github-app-token@v2
id: create-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
token: ${{ steps.create-token.outputs.token }}
- name: Install Dependencies
uses: ./.github/actions/install-yarn-dependencies
with:
node-version: 22
- name: Install nix
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
- name: Configure Git
run: |
git config --local user.email "${GITHUB_EMAIL}"
git config --local user.name "${GITHUB_USER}"
env:
GITHUB_USER: jaronz-ci[bot]
GITHUB_EMAIL: 227836284+jaronz-ci[bot]@users.noreply.github.com
token: ${{ steps.create-token.outputs.token }}
# - name: Build
# run: yarn build
- name: Refresh Modpack
working-directory: packages/${{ matrix.modpack }}/modpack
run: nix develop --command packwiz refresh
- name: Commit Changes and Push
run: |
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "chore(${{ matrix.modpack }}): refresh index"
git pull --rebase origin ${{ github.head_ref || 'main' }}
git push origin HEAD:${{ github.head_ref || 'main' }}
else
echo "No changes to commit."
fi
env:
GITHUB_TOKEN: ${{ steps.create-token.outputs.token }}