This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |