forked from admin/ansible
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d88eac4c65 | ||
|
|
4c9bc90dcb |
@@ -0,0 +1,57 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Tag to build (e.g. v0.1.0-test1)
|
||||
required: true
|
||||
default: v0.1.0-test1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: log into Gitea Packages
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.rudolf.keenetic.link
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: resolve version
|
||||
id: version
|
||||
run: |
|
||||
if [ -n "${{ github.event.inputs.tag }}" ]; then
|
||||
echo "VERSION=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "VERSION=${GITHUB_REF_NAME#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: connectivity_tester
|
||||
file: connectivity_tester/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ steps.version.outputs.VERSION }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:latest
|
||||
|
||||
- name: render stack-compose
|
||||
run: |
|
||||
mkdir -p out
|
||||
TAG=${{ steps.version.outputs.VERSION }}
|
||||
sed "s|\${version}|$TAG|g" connectivity_tester/stack-compose.yml > "out/docker-compose-$TAG.yml"
|
||||
|
||||
- name: upload rendered stack-compose
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: stack-compose
|
||||
path: out/
|
||||
Reference in New Issue
Block a user