-
Notifications
You must be signed in to change notification settings - Fork 107
59 lines (59 loc) · 1.99 KB
/
public.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: DockerGS (Public)
on:
push: # auto
paths:
- "gs/ver_GSServer-GCOriginal-5.0"
- ".github/workflows/public.yml"
workflow_dispatch: # manual
inputs:
repo:
description: "Repo"
required: true
default: "YuukiPS/Grasscutters-Original"
branches:
description: "Branches Repo"
required: true
default: "5.0"
resources:
description: "Branches Resources"
required: true
default: "5.0"
platforms:
description: "Platforms"
required: true
default: "linux/amd64,linux/arm64"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Sync DockerGS
uses: actions/checkout@v3
- name: Sync Repo
uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.repo || 'YuukiPS/Grasscutters-Original' }}
ref: ${{ github.event.inputs.branches || '5.0' }}
path: gs/tmp
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{secrets.DOCKER_USER}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Get Version only #1=os for ubuntu,2 metode for version_action, 3 for version branches, 4 for version resources (normal not need)
run: cd gs && chmod +x run.sh && sh run.sh ubuntu version_action ${{ github.event.inputs.branches || '5.0' }} ${{ github.event.inputs.resources || '5.0' }}
- name: Build and Push
uses: docker/build-push-action@v3
with:
context: ./gs
file: ./gs/os-ubuntu-gc-action # use image docker for folder tmp
platforms: ${{ github.event.inputs.platforms || 'linux/amd64,linux/arm64' }}
push: true
tags: |
${{ env.ver1 }}
${{ env.ver2 }}
cache-from: type=gha
cache-to: type=gha,mode=max