2024-07-14 14:45:20 -05:00
|
|
|
on:
|
2024-07-14 14:54:42 -05:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
2024-07-14 14:45:20 -05:00
|
|
|
|
|
|
|
env:
|
2024-07-14 17:26:53 -05:00
|
|
|
GHCR_NAMESPACE: sigb.us
|
2024-07-14 14:45:20 -05:00
|
|
|
PLATFORMS: linux/amd64
|
|
|
|
FORGEJO_USER: signaryk
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
monolith:
|
|
|
|
name: Monolith image
|
|
|
|
runs-on: docker
|
2024-07-14 15:05:33 -05:00
|
|
|
container:
|
2024-07-14 17:10:25 -05:00
|
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
2024-07-14 14:45:20 -05:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get release tag & build flags
|
|
|
|
if: github.event_name == 'release' # Only for GitHub releases
|
|
|
|
run: |
|
|
|
|
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to sigb.us container registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: git.sigb.us
|
|
|
|
username: ${{ env.FORGEJO_USER }}
|
|
|
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build main monolith image
|
|
|
|
id: docker_build_monolith
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: ${{ env.PLATFORMS }}
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:${{ github.ref_name }}
|
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:latest
|
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:devel
|
|
|
|
|
|
|
|
- name: Build release monolith image
|
|
|
|
if: github.event_name == 'release' # Only for GitHub releases
|
|
|
|
id: docker_build_monolith_release
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: ${{ env.PLATFORMS }}
|
|
|
|
push: true
|
|
|
|
tags: |
|
2024-07-14 17:26:53 -05:00
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:latest
|
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:stable
|
|
|
|
git.sigb.us/${{ env.GHCR_NAMESPACE }}/dendrite:${{ env.RELEASE_VERSION }}
|