forked from admin/ansible
Compare commits
2
Commits
master
...
auto-703e0198
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
703e0198cf | ||
|
|
9af2cd992f |
@@ -4,66 +4,27 @@ 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
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
os: ubuntu-24.04
|
||||
- platform: linux/arm64
|
||||
os: ubuntu-24.04-arm
|
||||
- platform: linux/arm/v7
|
||||
os: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: log into Gitea Packages
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.rudolf.keenetic.link
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: resolve version
|
||||
id: version
|
||||
env:
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
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
|
||||
echo "PLATFORM_SAFE=${PLATFORM//\//-}" >> "$GITHUB_OUTPUT"
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: connectivity_tester
|
||||
file: connectivity_tester/Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
tags: |
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ steps.version.outputs.VERSION }}-${{ env.PLATFORM_SAFE }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:latest-${{ env.PLATFORM_SAFE }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ github.ref_name }}
|
||||
gitea.rudolf.keenetic.link/hermes/connectivity_tester:latest
|
||||
|
||||
Reference in New Issue
Block a user