Skip to content

srcbuild

srcbuild #104

Workflow file for this run

name: Build Experimental Images
on:
push:
branches:
- main
paths:
- "beta/**"
repository_dispatch:
types: [srcbuild]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
tag:
- '{ "tag": "alpine-beta", "folder": "beta/alpine", "file": "Dockerfile", "platforms": "linux/amd64,linux/arm64" }'
- '{ "tag": "source", "folder": "beta/source", "file": "Dockerfile", "platforms": "linux/amd64" }'
- '{ "tag": "dotnet6", "folder": "beta/source", "file": "Dockerfile.dotnet6", "platforms": "linux/amd64,linux/arm64" }'
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Login to GitHub CR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- 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
#if: github.event_name != 'schedule' || fromJSON(matrix.tag).tag == 'source'
uses: docker/build-push-action@v5
with:
push: true
context: "{{defaultContext}}:${{ fromJSON(matrix.tag).folder }}"
tags: >
soupbowl/opensimulator:${{ fromJSON(matrix.tag).tag }},
ghcr.io/soup-bowl/opensimulator-docker:${{ fromJSON(matrix.tag).tag }},
platforms: ${{ fromJSON(matrix.tag).platforms }}
file: "${{ fromJSON(matrix.tag).file }}"
cache-from: type=gha
cache-to: type=gha,mode=max