Skip to content

Commit 9615de0

Browse files
authored
Update BuildImage workflow for pull requests
Signed-off-by: aptalca <[email protected]>
1 parent ca1e932 commit 9615de0

1 file changed

Lines changed: 29 additions & 11 deletions

File tree

.github/workflows/BuildImage.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
name: Build Image
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
mod_version:
7-
type: string
8-
required: false
4+
pull_request_target:
95

106
env:
11-
MOD_VERSION: ${{ inputs.mod_version }}
12-
GITHUB_REPO: "linuxserver/docker-mods" #don't modify
13-
ENDPOINT: "linuxserver/mods" #don't modify
14-
BASEIMAGE: "master"
15-
MODNAME: "dummy"
16-
MULTI_ARCH: "false" #set to false if not needed
7+
GITHUB_REPO: "linuxserver/docker-mods"
8+
ENDPOINT: "linuxserver/mods"
9+
BASEIMAGE: "pr"
10+
MODNAME: "build"
11+
MULTI_ARCH: "true"
12+
MOD_VERSION: ""
1713

1814
jobs:
1915
set-vars:
@@ -27,3 +23,25 @@ jobs:
2723
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_STEP_SUMMARY
2824
echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_STEP_SUMMARY
2925
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_STEP_SUMMARY
26+
outputs:
27+
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}
28+
ENDPOINT: ${{ steps.outputs.outputs.ENDPOINT }}
29+
BASEIMAGE: ${{ steps.outputs.outputs.BASEIMAGE }}
30+
MODNAME: ${{ steps.outputs.outputs.MODNAME }}
31+
MOD_VERSION: ${{ steps.outputs.outputs.MOD_VERSION }}
32+
33+
build:
34+
if: github.base_ref != 'refs/heads/master'
35+
uses: linuxserver/github-workflows/.github/workflows/docker-mod-builder.yml@v1
36+
needs: set-vars
37+
secrets:
38+
CR_USER: ${{ secrets.CR_USER }}
39+
CR_PAT: ${{ secrets.CR_PAT }}
40+
DOCKERUSER: ${{ secrets.DOCKERUSER }}
41+
DOCKERPASS: ${{ secrets.DOCKERPASS }}
42+
with:
43+
GITHUB_REPO: ${{ needs.set-vars.outputs.GITHUB_REPO }}
44+
ENDPOINT: ${{ needs.set-vars.outputs.ENDPOINT }}
45+
BASEIMAGE: ${{ needs.set-vars.outputs.BASEIMAGE }}
46+
MODNAME: ${{ needs.set-vars.outputs.MODNAME }}
47+
MOD_VERSION: ${{ needs.set-vars.outputs.MOD_VERSION }}

0 commit comments

Comments
 (0)