42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Go-tags
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TOKEN: ${{ secrets.TOKEN }}
|
|
USERNAME: ${{ vars.USERNAME }}
|
|
TAG_VERSION: ${{ github.ref_name }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Quemu
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set Up BuildX
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: https://git.maximotejeda.com
|
|
username: ${{ vars.USERNAME }}
|
|
password: ${{ secrets.PWD }}
|
|
|
|
- name: calculate short sha
|
|
run: |
|
|
echo "shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: git.maximotejeda.com/maximo/ddns:${{ github.ref_name }}
|
|
build-args: "version=${{ github.ref_name }}","SHORTSHA=${{ steps.vars.outputs.shortsha }}"
|