Skip to content

merge main

merge main #13

Workflow file for this run

name: "[develop] Setup, Build, and Push"
on:
push:
branches:
- develop
paths-ignore:
- '.github/workflows/**'
workflow_dispatch:
env:
IMAGE_VERSION: develop
jobs:
develop:
runs-on: ubuntu-latest
steps:
- name: Register repository name
run: |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" | tee $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: develop
- name: Register package version
run: |
echo "PACKAGE_VERSION=$(cat package.json | jq '.version' | tr -d '"')" | tee $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=false
prefix=${{ env.IMAGE_VERSION }}-,onlatest=true
images: |
${{ vars.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY_NAME }}
ghcr.io/${{ github.repository_owner }}/${{ env.REPOSITORY_NAME }}
tags: |
type=raw,prefix=,priority=1000,value=${{ env.IMAGE_VERSION }}
type=semver,pattern={{version}},value=${{ env.PACKAGE_VERSION }}
type=semver,pattern={{major}}.{{minor}},value=${{ env.PACKAGE_VERSION }}
type=semver,pattern={{major}},value=${{ env.PACKAGE_VERSION }}
labels: |
org.opencontainers.image.documentation=${{ github.server_url }}/${{ github.repository }}/
org.opencontainers.image.authors=${{ github.repository_owner }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}