diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..0aedebd --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -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 }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c0f6aa6..0000000 --- a/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM node:16-bullseye diff --git a/dockerfiles/ubuntu-slim.dockerfile b/dockerfiles/ubuntu-slim.dockerfile new file mode 100644 index 0000000..8b87784 --- /dev/null +++ b/dockerfiles/ubuntu-slim.dockerfile @@ -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." diff --git a/dockerfiles/ubuntu.dockerfile b/dockerfiles/ubuntu.dockerfile new file mode 100644 index 0000000..27951c1 --- /dev/null +++ b/dockerfiles/ubuntu.dockerfile @@ -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."