Skip to content

v0.2.3

v0.2.3 #94

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-and-push-image:
strategy:
matrix:
worker-type: [worker, maintenance, static-mirroring]
fail-fast: true
name: Build and push container image
runs-on: ubuntu-22.04
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- 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.IMAGE_NAME }}
- name: Set tags
id: set-tags
run: |
VERSION=${{ steps.meta.outputs.version }}-${{ matrix.worker-type }}
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$VERSION" | tr A-Z a-z >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.set-tags.outputs.tag }}
labels: |
${{ steps.meta.outputs.labels }}
org.opencontainers.image.title=denostr
org.opencontainers.image.description=Deno-based cloud-native nostr implementation supported
org.opencontainers.image.version=${{ steps.set-tags.outputs.version }}
build-args: |
WORKER_TYPE=${{ matrix.worker-type }}