Skip to content

update licence and attribution #4

update licence and attribution

update licence and attribution #4

Workflow file for this run

name: Docker Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: Git tag to release, for example v0.2.0
required: true
type: string
permissions:
contents: write
jobs:
release:
name: Build, Publish, and Release
runs-on: ubuntu-latest
environment: dockerhub
steps:
- name: Determine release tag
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ inputs.tag }}"
else
TAG="${{ github.ref_name }}"
fi
case "$TAG" in
v*)
VERSION="${TAG#v}"
;;
*)
echo "Tag must start with v, got: $TAG" >&2
exit 1
;;
esac
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ steps.version.outputs.tag }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
build-args: |
APP_VERSION=${{ steps.version.outputs.version }}
tags: |
worryboy/internetx-dyndns:${{ steps.version.outputs.version }}
worryboy/internetx-dyndns:latest
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
generate_release_notes: true