2024-10-31 09:14:35 +07:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: check-out
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- 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:
|
2024-10-31 09:23:54 +07:00
|
|
|
context: .
|
|
|
|
file: Dockerfile
|
2024-10-31 09:14:35 +07:00
|
|
|
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/ms/transocks:${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
|
|
git.mousesoft.ru/ms/transocks:latest
|