Skip to content

Merge pull request #1 from RosemanLabs/use-new-alpine #3

Merge pull request #1 from RosemanLabs/use-new-alpine

Merge pull request #1 from RosemanLabs/use-new-alpine #3

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
IMAGE_NAME: # set explictly in build-variables
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: cat build-variables >> $GITHUB_ENV
- uses: docker/[email protected]
- uses: docker/[email protected]
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: tags
uses: docker/[email protected]
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- id: build-args
run: |
ref=${{ github.ref }}
vpatch=${ref##refs/*/}
patch=${vpatch#v}
echo "date=$(date --utc --iso-8601=seconds)" >> $GITHUB_OUTPUT
echo "version=$patch" >> $GITHUB_OUTPUT
- uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: ${{ steps.tags.outputs.tags }}
build-args: |
BUILD_DATE=${{ steps.build-args.outputs.date }}
IMAGE_VERSION=${{ steps.build-args.outputs.version }}
push: true