-
-
Notifications
You must be signed in to change notification settings - Fork 40
32 lines (27 loc) · 812 Bytes
/
compile.yml
File metadata and controls
32 lines (27 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Compile Modpack
on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
compile:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'build')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get branch name
id: branch
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "branch_name=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
fi
- name: Compile modpack
uses: ./.github/actions/compile-modpack
with:
branch_name: ${{ steps.branch.outputs.branch_name }}