Support Initial Backups #160
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: Docker CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: | |
- published | |
env: | |
docker_tag: ${{ github.event_name != 'release' && 'test' || 'latest' }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: Docker - ${{ matrix.os }} | |
if: github.repository == 'Kaiede/Bedrockifier' | |
env: | |
arch: ${{ matrix.os == 'ubuntu-latest' && 'amd64' || 'arm64' }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'buildjet-2vcpu-ubuntu-2204-arm'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build ${{ env.arch }} | |
uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
file: ./Docker/Dockerfile | |
platforms: linux/${{ env.arch }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: kaiede/minecraft-bedrock-backup:${{ env.docker_tag }}-${{ env.arch }} | |
build-args: | | |
QEMU_CPU=max | |
arch=${{ env.arch }} | |
swift_base=${{ env.swift_base }} | |
swift_version=${{ env.swift_version }} | |
merge-tags: | |
needs: ['build'] | |
runs-on: ubuntu-latest | |
if: github.repository == 'Kaiede/Bedrockifier' && github.event_name != 'pull_request' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Make Manifest - ${{ env.docker_tag }} | |
if: github.event_name != 'pull_request' | |
run: bash Docker/merge.sh kaiede/minecraft-bedrock-backup:${{ env.docker_tag }} kaiede/minecraft-bedrock-backup:${{ env.docker_tag }} | |
- name: Get Release Tag | |
id: tag | |
if: github.event_name == 'release' | |
uses: dawidd6/action-get-tag@v1 | |
- name: Make Manifest - ${{ steps.tag.outputs.tag }} | |
if: github.event_name == 'release' | |
run: bash Docker/merge.sh kaiede/minecraft-bedrock-backup:${{ steps.tag.outputs.tag }} kaiede/minecraft-bedrock-backup:${{ env.docker_tag }} |