mirror of
https://github.com/soup-bowl/opensimulator-docker.git
synced 2026-07-30 11:33:45 +00:00
Condensed build script.
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
name: Build Main Container
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "build/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
tag: ['latest']
|
||||
steps:
|
||||
- name: Checkout Codebase
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to ghcr.io
|
||||
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u soup-bowl --password-stdin
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_SECRET }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build Container
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
context: "{{defaultContext}}:build/${{ matrix.tag }}"
|
||||
tags: >
|
||||
soupbowl/opensimulator:${{ matrix.tag }},
|
||||
ghcr.io/soup-bowl/opensimulator-docker:${{ matrix.tag }},
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -1,10 +1,11 @@
|
||||
name: Build Beta Container
|
||||
name: Build Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "build/**"
|
||||
- "beta/**"
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
@@ -15,7 +16,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
tag: ['alpine-beta', 'source']
|
||||
tag:
|
||||
- '{ "tag": "latest", "folder": "build/latest", "platforms": "linux/amd64,linux/arm64" }'
|
||||
- '{ "tag": "alpine-beta", "folder": "beta/alpine", "platforms": "linux/amd64,linux/arm64" }'
|
||||
- '{ "tag": "source", "folder": "beta/source", "platforms": "linux/amd64,linux/arm64" }'
|
||||
steps:
|
||||
- name: Checkout Codebase
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,13 +41,14 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build Container
|
||||
if: github.event_name != 'schedule' || fromJSON(matrix.tag).tag == 'source'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
context: "{{defaultContext}}:beta/${{ matrix.tag }}"
|
||||
context: "{{defaultContext}}:${{ fromJSON(matrix.tag).folder }}"
|
||||
tags: >
|
||||
soupbowl/opensimulator:${{ matrix.tag }},
|
||||
ghcr.io/soup-bowl/opensimulator-docker:${{ matrix.tag }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
soupbowl/opensimulator:${{ fromJSON(matrix.tag).tag }},
|
||||
ghcr.io/soup-bowl/opensimulator-docker:${{ fromJSON(matrix.tag).tag }},
|
||||
platforms: ${{ fromJSON(matrix.tag).platforms }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in New Issue
Block a user