2
0

Первая версия.
Some checks failed
release / base (push) Failing after 1m0s

This commit is contained in:
Алексей Бадяев 2024-10-10 18:48:49 +07:00
parent adbb5cd2dc
commit 2e8e5ac871
Signed by: alexey
GPG Key ID: 686FBC1363E4AFAE
8 changed files with 192 additions and 1 deletions

View File

@ -0,0 +1,118 @@
name: release
on:
schedule:
- cron: 0 0 1 * *
push:
branches:
- main
jobs:
base:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: set-up qemu
uses: docker/setup-qemu-action@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:
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=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: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 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=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: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 }}

8
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
"cSpell.words": [
"buildkitd",
"buildx",
"dockerfiles",
"gitea"
]
}

View File

@ -1,3 +1,12 @@
# gitea-runner-images
Сборка docker-образов для Gitea runner.
Сборка docker-образов для Gitea runner. Сборка образов выполняется при изменении
в ветке `main` и первого числа каждого месяца.
В результате сборки создаются следующие образы
`git.mousesoft.ru/ms/gitea-runner-images` со следующими метками:
1. `ubuntu-22.04` (псевдоним - `latest`)
2. `python-ubuntu-22.04` (псевдоним - `python-latest`)
3. `ubuntu-20.04`
4. `python-ubuntu-20.04`

View File

@ -0,0 +1,30 @@
ARG BASE_IMAGE_TAG
FROM gitea/runner-images:${BASE_IMAGE_TAG}
ARG IMAGE_CREATED
ARG IMAGE_VERSION
ARG IMAGE_REVISION
LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \
org.opencontainers.image.authors="MouseSoft" \
org.opencontainers.image.url="https://git.mousesoft.ru/ms/gitea-runner-images" \
org.opencontainers.image.documentation="https://git.mousesoft.ru/ms/gitea-runner-images/src/branch/main/README.md" \
org.opencontainers.image.source="https://git.mousesoft.ru/ms/gitea-runner-images" \
org.opencontainers.image.version="${IMAGE_VERSION}" \
org.opencontainers.image.revision="${IMAGE_REVISION}" \
org.opencontainers.image.vendor="MouseSoft" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="MouseSoft Gitea Actions runner images" \
org.opencontainers.image.description="MouseSoft docker images used by act_runner to run workflows."
ENV LANG=ru_RU.UTF-8
RUN apt-get update && \
apt-get install -y build-essential debhelper dh-exec dpkg-dev dput-ng \
fakeroot gawk locales sed && \
rm -rf /var/lib/apt/lists/*
COPY --chown=root:root etc /etc
RUN locale-gen --lang ru

View File

@ -0,0 +1,23 @@
ARG BASE_IMAGE_TAG
FROM git.mousesoft.ru/ms/gitea-runner-images:${BASE_IMAGE_TAG}
ARG IMAGE_CREATED
ARG IMAGE_VERSION
ARG IMAGE_REVISION
LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \
org.opencontainers.image.authors="MouseSoft" \
org.opencontainers.image.url="https://git.mousesoft.ru/ms/gitea-runner-images" \
org.opencontainers.image.documentation="https://git.mousesoft.ru/ms/gitea-runner-images/src/branch/main/README.md" \
org.opencontainers.image.source="https://git.mousesoft.ru/ms/gitea-runner-images" \
org.opencontainers.image.version="${IMAGE_VERSION}" \
org.opencontainers.image.revision="${IMAGE_REVISION}" \
org.opencontainers.image.vendor="MouseSoft" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="MouseSoft Gitea Actions runner images" \
org.opencontainers.image.description="MouseSoft docker images used by act_runner to run workflows."
RUN apt-get update && \
apt-get install -y libvirt-dev python3-all python3-dev python3-setuptools && \
rm -rf /var/lib/apt/lists/*

1
etc/default/locale Normal file
View File

@ -0,0 +1 @@
ru_RU.UTF-8

1
etc/environment Normal file
View File

@ -0,0 +1 @@
LANG="ru_RU.UTF-8"

1
etc/locale.gen Normal file
View File

@ -0,0 +1 @@
ru_RU.UTF-8 UTF-8