Skip to content

4.0.0-beta.4

4.0.0-beta.4 #15

Workflow file for this run

#
# A GitHub workflow to build containers for each semantically versioned tag (i.e. vX.Y.Z).
#
# help:
# - tagging info: https://github.com/docker/build-push-action/blob/v2/docs/advanced/tags-labels.md
# - original gist: https://gist.github.com/robb-j/049217ca8cecf4e214b8b82123f7371b
#
name: 'Build Containers'
on:
push:
tags: [v*.*.*]
env:
CLIENT_REGISTRY: containers.r0b.io/mozfest-plaza-client
SERVER_REGISTRY: containers.r0b.io/mozfest-plaza-server
jobs:
build_client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate client metadata
id: client_meta
uses: docker/metadata-action@v3
with:
images: |
${{ env.CLIENT_REGISTRY }}
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push / client
uses: docker/build-push-action@v3
with:
context: client
push: true
tags: ${{ steps.client_meta.outputs.tags }}
labels: ${{ steps.client_meta.outputs.labels }}
build_server:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate server metadata
id: server_meta
uses: docker/metadata-action@v3
with:
images: |
${{ env.SERVER_REGISTRY }}
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push / server
uses: docker/build-push-action@v3
with:
context: server
push: true
tags: ${{ steps.server_meta.outputs.tags }}
labels: ${{ steps.server_meta.outputs.labels }}