41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: commit-tag
|
|
on:
|
|
push
|
|
jobs:
|
|
commit-tag-image:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
env:
|
|
DOCKER_LATEST: nightly
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
REGISTRY: tuxpa.in
|
|
IMAGE_ROOT: a/wynn
|
|
strategy:
|
|
matrix:
|
|
path: ["./cmd/caddy"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get Meta
|
|
id: meta
|
|
run: |
|
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.24.x'
|
|
check-latest: true
|
|
cache-dependency-path: go/go.sum
|
|
- uses: ko-build/setup-ko@v0.8
|
|
with:
|
|
version: v0.17.1
|
|
env:
|
|
KO_DOCKER_REPO: tuxpa.in/a/wynn
|
|
- name: Build and push
|
|
env:
|
|
auth_token: ${{ secrets.ACTIONS_TOKEN }}
|
|
run: |
|
|
echo "${auth_token}" | ko login https://tuxpa.in --username actions_token --password-stdin
|
|
cd go && ko build -B -t ${{ gitea.ref_name }},${{ gitea.head_ref }} {{matrix.path}}
|