Skip to content

Merge pull request #3 from mbroton/ci-gh-actions #1

Merge pull request #3 from mbroton/ci-gh-actions

Merge pull request #3 from mbroton/ci-gh-actions #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta (proxy)
id: meta-proxy
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/proxy
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and push (proxy)
uses: docker/build-push-action@v6
with:
context: ./proxy
file: ./proxy/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-proxy.outputs.tags }}
labels: ${{ steps.meta-proxy.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/proxy:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/proxy:buildcache,mode=max
- name: Docker meta (worker)
id: meta-worker
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/worker
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and push (worker)
uses: docker/build-push-action@v6
with:
context: ./worker
file: ./worker/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-worker.outputs.tags }}
labels: ${{ steps.meta-worker.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/worker:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/worker:buildcache,mode=max
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true