Build images (#3)
Reviewed-on: https://gitea.com/gitea/runner-images/pulls/3
This commit is contained in:
114
.gitea/workflows/release.yaml
Normal file
114
.gitea/workflows/release.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 0 1 * *
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
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
|
||||
|
||||
- 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') > $GITHUB_OUTPUT
|
||||
echo IMAGE_VERSION=$(date -u +'v%y.%m.%d') >> $GITHUB_OUTPUT
|
||||
echo IMAGE_REVISION=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push default 22.04
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
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 }}
|
||||
gitea/runner-images:ubuntu-latest
|
||||
|
||||
- name: Build and push default 20.04
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
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 }}
|
||||
|
||||
- name: Build and push slim 22.04
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu-slim.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
args:
|
||||
BASE_IMAGE_TAG: 20-bookworm
|
||||
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-slim-22.04
|
||||
gitea/runner-images:ubuntu-slim-22.04-${{ steps.meta.outputs.IMAGE_VERSION }}
|
||||
gitea/runner-images:ubuntu-slim-latest
|
||||
|
||||
- name: Build and push slim 20.04
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu-slim.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
args:
|
||||
BASE_IMAGE_TAG: 20-bullseye
|
||||
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-slim-20.04
|
||||
gitea/runner-images:ubuntu-slim-20.04-${{ steps.meta.outputs.IMAGE_VERSION }}
|
||||
@@ -1 +0,0 @@
|
||||
FROM node:16-bullseye
|
||||
19
dockerfiles/ubuntu-slim.dockerfile
Normal file
19
dockerfiles/ubuntu-slim.dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
ARG BASE_IMAGE_TAG
|
||||
|
||||
FROM node:${BASE_IMAGE_TAG}
|
||||
|
||||
ARG IMAGE_CREATED
|
||||
ARG IMAGE_VERSION
|
||||
ARG IMAGE_REVISION
|
||||
|
||||
LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \
|
||||
org.opencontainers.image.authors="Gitea" \
|
||||
org.opencontainers.image.url="https://gitea.com/gitea/runner-images" \
|
||||
org.opencontainers.image.documentation="https://gitea.com/gitea/runner-images/src/branch/main/README.md" \
|
||||
org.opencontainers.image.source="https://gitea.com/gitea/runner-images" \
|
||||
org.opencontainers.image.version="${IMAGE_VERSION}" \
|
||||
org.opencontainers.image.revision="${IMAGE_REVISION}" \
|
||||
org.opencontainers.image.vendor="Gitea" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.title="Official Gitea Actions runner images" \
|
||||
org.opencontainers.image.description="Official docker images used by act_runner to run workflows."
|
||||
19
dockerfiles/ubuntu.dockerfile
Normal file
19
dockerfiles/ubuntu.dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
ARG BASE_IMAGE_TAG
|
||||
|
||||
FROM ghcr.io/catthehacker/ubuntu:${BASE_IMAGE_TAG}
|
||||
|
||||
ARG IMAGE_CREATED
|
||||
ARG IMAGE_VERSION
|
||||
ARG IMAGE_REVISION
|
||||
|
||||
LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \
|
||||
org.opencontainers.image.authors="Gitea" \
|
||||
org.opencontainers.image.url="https://gitea.com/gitea/runner-images" \
|
||||
org.opencontainers.image.documentation="https://gitea.com/gitea/runner-images/src/branch/main/README.md" \
|
||||
org.opencontainers.image.source="https://gitea.com/gitea/runner-images" \
|
||||
org.opencontainers.image.version="${IMAGE_VERSION}" \
|
||||
org.opencontainers.image.revision="${IMAGE_REVISION}" \
|
||||
org.opencontainers.image.vendor="Gitea" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.title="Official Gitea Actions runner images" \
|
||||
org.opencontainers.image.description="Official docker images used by act_runner to run workflows."
|
||||
Reference in New Issue
Block a user