transocks/.gitea/workflows/release.yaml
Алексей Бадяев a59ad95f63
All checks were successful
build / build (push) Successful in 1m34s
build / build_windows (push) Successful in 1m24s
Добавлен build workflow.
2024-11-01 22:43:08 +07:00

57 lines
1.6 KiB
YAML

name: release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: check-out
uses: https://gitea.com/actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: set-up qemu
uses: https://git.mousesoft.ru/ms/gitea-action-setup-qemu@v3
- name: set-up docker buildx
uses: https://git.mousesoft.ru/ms/gitea-action-docker-setup-buildx@v3
with:
buildkitd-flags: --debug
- name: login to docker hub
uses: https://git.mousesoft.ru/ms/gitea-action-docker-login@v3
with:
registry: git.mousesoft.ru
username: ${{ secrets.API_USER }}
password: ${{ secrets.API_TOKEN }}
- name: meta
id: meta
run: |
echo IMAGE_CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | tee -a $GITHUB_OUTPUT
echo IMAGE_VERSION=$(./version.sh n) | tee -a $GITHUB_OUTPUT
echo IMAGE_REVISION=$(git rev-parse HEAD) | tee -a $GITHUB_OUTPUT
- name: build and push
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: Dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
tags: |
git.mousesoft.ru/alexey/transocks:${{ steps.meta.outputs.IMAGE_VERSION }}
git.mousesoft.ru/alexey/transocks:latest