Skip to content

RELEASING: Releasing 1 package(s) #27

RELEASING: Releasing 1 package(s)

RELEASING: Releasing 1 package(s) #27

Workflow file for this run

name: delivery
on:
push:
tags:
- "**"
env:
REGISTRY: ghcr.io
SERVER_IMAGE_NAME: ${{ github.repository }}/server
CLIENT_IMAGE_NAME: ${{ github.repository }}/client
jobs:
server:
if: startsWith(github.ref, 'refs/tags/server')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}
tags: |
type=match,pattern=server@(.*),group=1
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./packages/server/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
client:
if: startsWith(github.ref, 'refs/tags/client')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.CLIENT_IMAGE_NAME }}
tags: |
type=match,pattern=client@(.*),group=1
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./packages/client/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max