230 lines
7.9 KiB
YAML
230 lines
7.9 KiB
YAML
name: release
|
|
|
|
on:
|
|
schedule:
|
|
- cron: 0 0 1 * *
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
release-default:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: gitea/runner-images: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: docker/setup-buildx-action@v3
|
|
with:
|
|
buildkitd-flags: --debug
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- 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 default 24.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu.dockerfile
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
pull: true
|
|
push: true
|
|
no-cache: true
|
|
build-args: |
|
|
BASE_IMAGE_TAG=act-24.04
|
|
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
|
|
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
|
|
tags: |
|
|
gitea/runner-images:ubuntu-24.04
|
|
gitea/runner-images:ubuntu-24.04-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
gitea/runner-images:ubuntu-latest
|
|
|
|
- name: Build and push default 22.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu.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: |
|
|
gitea/runner-images:ubuntu-22.04
|
|
gitea/runner-images:ubuntu-22.04-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
|
|
- name: Build and push default 20.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu.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: |
|
|
gitea/runner-images:ubuntu-20.04
|
|
gitea/runner-images:ubuntu-20.04-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
|
|
release-slim:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: gitea/runner-images: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: docker/setup-buildx-action@v3
|
|
with:
|
|
buildkitd-flags: --debug
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- 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 slim 24.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu-slim.dockerfile
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
pull: true
|
|
push: true
|
|
no-cache: true
|
|
build-args: |
|
|
BASE_IMAGE_TAG=20-bookworm-slim
|
|
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
|
|
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
|
|
tags: |
|
|
gitea/runner-images:ubuntu-24.04-slim
|
|
gitea/runner-images:ubuntu-24.04-slim-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
gitea/runner-images:ubuntu-latest-slim
|
|
|
|
- name: Build and push slim 22.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu-slim.dockerfile
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
pull: true
|
|
push: true
|
|
no-cache: true
|
|
build-args: |
|
|
BASE_IMAGE_TAG=20-bookworm-slim
|
|
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
|
|
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
|
|
tags: |
|
|
gitea/runner-images:ubuntu-22.04-slim
|
|
gitea/runner-images:ubuntu-22.04-slim-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
|
|
- name: Build and push slim 20.04
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: dockerfiles/ubuntu-slim.dockerfile
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
pull: true
|
|
push: true
|
|
no-cache: true
|
|
build-args: |
|
|
BASE_IMAGE_TAG=20-bullseye-slim
|
|
IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }}
|
|
IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }}
|
|
tags: |
|
|
gitea/runner-images:ubuntu-20.04-slim
|
|
gitea/runner-images:ubuntu-20.04-slim-${{ steps.meta.outputs.IMAGE_VERSION }}
|
|
|
|
release-full:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: gitea/runner-images:ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- 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: Install skopeo
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y skopeo
|
|
|
|
- name: Copy full 24.04
|
|
run: |
|
|
for dest in ubuntu-24.04-full ubuntu-24.04-full-${{ steps.meta.outputs.IMAGE_VERSION }} ubuntu-latest-full; do
|
|
echo "copy catthehacker/ubuntu:full-24.04 -> gitea/runner-images:$dest"
|
|
skopeo copy -a --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} docker://ghcr.io/catthehacker/ubuntu:full-24.04 docker://gitea/runner-images:$dest
|
|
done
|
|
|
|
- name: Copy full 22.04
|
|
run: |
|
|
for dest in ubuntu-22.04-full ubuntu-22.04-full-${{ steps.meta.outputs.IMAGE_VERSION }}; do
|
|
echo "copy catthehacker/ubuntu:full-22.04 -> gitea/runner-images:$dest"
|
|
skopeo copy -a --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} docker://ghcr.io/catthehacker/ubuntu:full-22.04 docker://gitea/runner-images:$dest
|
|
done
|
|
- name: Copy full 20.04
|
|
run: |
|
|
for dest in ubuntu-20.04-full ubuntu-20.04-full-${{ steps.meta.outputs.IMAGE_VERSION }}; do
|
|
echo "copy catthehacker/ubuntu:full-20.04 -> gitea/runner-images:$dest"
|
|
skopeo copy -a --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} docker://ghcr.io/catthehacker/ubuntu:full-20.04 docker://gitea/runner-images:$dest
|
|
done
|