From e7f5e0b45c83abcb858e03d7ddd017568d44aea0 Mon Sep 17 00:00:00 2001 From: James Brumond Date: Thu, 2 Nov 2023 21:07:54 -0700 Subject: [PATCH] building test image / workflow --- .gitea/workflows/build-and-pubish.yaml | 47 ++++++++++++++++++++++++++ .gitea/workflows/build.yaml | 39 +++++++++++++++++++++ Dockerfile | 6 ++++ 3 files changed, 92 insertions(+) create mode 100644 .gitea/workflows/build-and-pubish.yaml create mode 100644 .gitea/workflows/build.yaml create mode 100644 Dockerfile diff --git a/.gitea/workflows/build-and-pubish.yaml b/.gitea/workflows/build-and-pubish.yaml new file mode 100644 index 0000000..84025b9 --- /dev/null +++ b/.gitea/workflows/build-and-pubish.yaml @@ -0,0 +1,47 @@ + +name: Build and publish container images + +on: +- workflow_dispatch + +jobs: + build-and-publish: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: gitea.jbrumond.me + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and publish + uses: docker/build-push-action@v4 + env: + # see + ACTIONS_RUNTIME_TOKEN: '' + with: + context: . + push: true + tags: | + gitea.jbrumond.me/images/rotate-backups:8 + gitea.jbrumond.me/images/rotate-backups:8.1 + platforms: | + linux/amd64 + linux/arm64 + # linux/riscv64 + # linux/arm/v7 + # linux/arm/v6 + build-args: | + NODE_VERSION=20 diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..1cebbff --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ + +name: Build container images + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build + uses: docker/build-push-action@v4 + env: + # see + ACTIONS_RUNTIME_TOKEN: '' + with: + context: . + push: false + platforms: | + linux/amd64 + linux/arm64 + # linux/riscv64 + # linux/arm/v7 + # linux/arm/v6 + build-args: | + NODE_VERSION=20 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..19742d7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ + +ARG NODE_VERSION=20 + +FROM node:${NODE_VERSION} + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh