Skip to content

Release

Release #32

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
- "!v*-*" # v1.2.3-alphd0
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/thingsdb/node
- name: Get the version
id: get_version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Build and push Docker image (gcloud)
uses: docker/build-push-action@v5
with:
context: .
push: true
file: docker/gcloud.Dockerfile
tags: ghcr.io/thingsdb/node:gcloud-${{ steps.get_version.outputs.VERSION }},ghcr.io/thingsdb/node:gcloud
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (full)
uses: docker/build-push-action@v5
with:
context: .
push: true
file: docker/full.Dockerfile
tags: ghcr.io/thingsdb/node:full-${{ steps.get_version.outputs.VERSION }},ghcr.io/thingsdb/node:full
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (minimal)
uses: docker/build-push-action@v5
with:
context: .
push: true
file: docker/Dockerfile
tags: ghcr.io/thingsdb/node:${{ steps.get_version.outputs.VERSION }},ghcr.io/thingsdb/node:latest
labels: ${{ steps.meta.outputs.labels }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image (arm64)
uses: docker/build-push-action@v5
with:
context: .
push: true
file: docker/arm64.Dockerfile
tags: ghcr.io/thingsdb/node:arm64-${{ steps.get_version.outputs.VERSION }},ghcr.io/thingsdb/node:arm64
platforms: linux/amd64,linux/arm64/v8
labels: ${{ steps.meta.outputs.labels }}