forked from admin/ansible
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6444ad49c | ||
|
|
eb851d9b1d | ||
|
|
c719f6ab8d | ||
|
|
6e6f9c67fc | ||
|
|
77b3cc2c08 | ||
|
|
d011648e56 | ||
|
|
c22cadc48b | ||
|
|
2fa05da943 | ||
|
|
3406491dcc | ||
|
|
7a08d4d022 | ||
|
|
6e9a998eba | ||
|
|
ef4af24c1e | ||
|
|
f80a524d33 |
@@ -2,8 +2,17 @@ name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'auto-*'
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Image tag (e.g. auto-<sha>)'
|
||||
required: false
|
||||
default: latest
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,6 +28,16 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: resolve version
|
||||
id: version
|
||||
run: |
|
||||
if [ -n "${{ inputs.tag }}" ] && [ "${{ inputs.tag }}" != "latest" ]; then
|
||||
echo "VERSION=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "VERSION=${GITHUB_REF_NAME##*/}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "VERSION=$VERSION"
|
||||
|
||||
- name: build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
@@ -26,5 +45,5 @@ jobs:
|
||||
file: connectivity_tester/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ github.ref_name }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ steps.version.outputs.VERSION }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:latest
|
||||
|
||||
Reference in New Issue
Block a user