2
0
gitea-runner-images/.gitea/workflows/release.yaml
2024-10-10 21:52:52 +07:00

163 lines
5.9 KiB
YAML

name: release
on:
schedule:
- cron: 0 0 1 * *
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: check-out code
uses: actions/checkout@v4
with:
lfs: 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: get meta
id: meta
run: |
echo IMAGE_CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | tee -a $GITHUB_OUTPUT
echo IMAGE_VERSION=$(date -u +'v%y.%m.%d') | tee -a $GITHUB_OUTPUT
echo IMAGE_REVISION=$(git rev-parse HEAD) | tee -a $GITHUB_OUTPUT
- name: build and push base 22.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/base.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=act-22.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:ubuntu-22.04
git.mousesoft.ru/ms/gitea-runner-images:ubuntu-22.04-${{ steps.meta.outputs.IMAGE_VERSION }}
git.mousesoft.ru/ms/gitea-runner-images:ubuntu-latest
- name: build and push python 22.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/python.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=ubuntu-22.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:python-ubuntu-22.04
git.mousesoft.ru/ms/gitea-runner-images:python-ubuntu-22.04-${{ steps.meta.outputs.IMAGE_VERSION }}
git.mousesoft.ru/ms/gitea-runner-images:python-ubuntu-latest
- name: build and push doc 22.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/doc.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=act-22.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:doc-ubuntu-22.04
git.mousesoft.ru/ms/gitea-runner-images:doc-ubuntu-22.04-${{ steps.meta.outputs.IMAGE_VERSION }}
git.mousesoft.ru/ms/gitea-runner-images:doc-ubuntu-latest
- name: build and push base 20.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/base.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=act-20.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:ubuntu-20.04
git.mousesoft.ru/ms/gitea-runner-images:ubuntu-20.04-${{ steps.meta.outputs.IMAGE_VERSION }}
- name: build and push python 20.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/python.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=ubuntu-20.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:python-ubuntu-20.04
git.mousesoft.ru/ms/gitea-runner-images:python-ubuntu-20.04-${{ steps.meta.outputs.IMAGE_VERSION }}
- name: build and push doc 20.04
uses: https://git.mousesoft.ru/ms/gitea-action-docker-build-push@v6
with:
context: .
file: dockerfiles/doc.dockerfile
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
no-cache: true
build-args: |
BASE_IMAGE_TAG=act-22.04
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
tags: |
git.mousesoft.ru/ms/gitea-runner-images:doc-ubuntu-20.04
git.mousesoft.ru/ms/gitea-runner-images:doc-ubuntu-20.04-${{ steps.meta.outputs.IMAGE_VERSION }}