All checks were successful
Build container images / build (push) Successful in 1m52s
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
|
|
name: Build and publish container images
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
type: string
|
|
description: Tag to Publish
|
|
default: latest
|
|
required: true
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: gitea.jbrumond.me
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Parse Version String
|
|
shell: bash
|
|
run: |
|
|
if egrep '^[0-9]+\.[0-9]+\.[0-9]+$' <<<"$token" >/dev/null 2>&1 ; then
|
|
local n=${token//[!0-9]/ }
|
|
local a=(${n//\./ })
|
|
echo "major=${a[0]}" >> $GITHUB_OUTPUT
|
|
echo "minor=${a[1]}" >> $GITHUB_OUTPUT
|
|
echo "patch=${a[2]}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo 'Invalid semver version given'
|
|
exit 1
|
|
fi
|
|
|
|
# - name: Build Container and publish
|
|
# uses: docker/build-push-action@v4
|
|
# env:
|
|
# # see <https://docs.gitea.com/usage/actions/comparison#dockerbuild-push-actionv4>
|
|
# ACTIONS_RUNTIME_TOKEN: ''
|
|
# with:
|
|
# context: .
|
|
# push: true
|
|
# tags: |
|
|
# gitea.jbrumond.me/doc-utils/utils:latest
|
|
# gitea.jbrumond.me/doc-utils/utils:0.2.0
|
|
# gitea.jbrumond.me/doc-utils/utils:0.2
|
|
# gitea.jbrumond.me/doc-utils/utils:0
|
|
# platforms: |
|
|
# linux/amd64
|
|
# linux/arm64
|
|
# # linux/riscv64
|
|
# # linux/arm/v7
|
|
# # linux/arm/v6
|
|
# build-args: |
|
|
# NODE_VERSION=22
|
|
# secrets: |
|
|
# "npmrc=@doc-utils:registry=https://gitea.jbrumond.me/api/packages/doc-utils/npm/
|
|
# //gitea.jbrumond.me/api/packages/doc-utils/npm/:_authToken=${{ secrets.NPM_TOKEN }}"
|