Skip to content

[NO-CI] fix schema id and readme reference #5

[NO-CI] fix schema id and readme reference

[NO-CI] fix schema id and readme reference #5

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
docker-publish:
name: Publish to Docker Hub
if: |
!contains(github.event.head_commit.message, '[ci skip]')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Automated version bump
uses: phips28/gh-action-bump-version@master
id: bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
run: |
RE='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)'
MAJOR=`echo $version | sed -e "s#$RE#\1#"`
MINOR=`echo $version | sed -e "s#$RE#\2#"`
PATCH=`echo $version | sed -e "s#$RE#\3#"`
echo "::set-output name=version::$MAJOR.$MINOR.$PATCH"
echo "::set-output name=major::$MAJOR"
echo "::set-output name=minor::$MAJOR.$MINOR"
id: version
env:
version: ${{ steps.bump.outputs.newTag }}
# - name: Set up QEMU
# uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
push: true
# I'm only going to build for amd64 because that's all I personally need
# ,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
platforms: linux/amd64
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
labels: "version=${{ steps.version.outputs.version }}"