From 9e4f7d6128444604cc83e02cad1b1f108eb63c9f Mon Sep 17 00:00:00 2001 From: Firq Date: Thu, 18 Jul 2024 21:55:54 +0200 Subject: [PATCH] Build and files --- .forgejo/workflows/build_release.yml | 36 ++++++++++++++++++++++++++++ .gitignore | 1 + Dockerfile | 2 ++ README.md | 4 +++- 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/build_release.yml create mode 100644 .gitignore create mode 100644 Dockerfile diff --git a/.forgejo/workflows/build_release.yml b/.forgejo/workflows/build_release.yml new file mode 100644 index 0000000..d531a48 --- /dev/null +++ b/.forgejo/workflows/build_release.yml @@ -0,0 +1,36 @@ +on: + push: + tags: + - '[0-9]+' + +jobs: + build: + runs-on: dind + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log into Docker Package Registry + uses: docker/login-action@v3 + with: + registry: forgejo.neshweb.net + username: ${{ secrets.FORGEJO_USERNAME }} + password: ${{ secrets.FORGEJO_TOKEN }} + - name: Build and push to Docker Package Registry + uses: docker/build-push-action@v5 + with: + push: true + tags: forgejo.neshweb.net/ci-docker-images/node-alpine-git:${{ github.ref_name }}, forgejo.neshweb.net/ci-docker-images/node-alpine-git:latest + + release: + needs: [ build ] + if: success() + runs-on: docker + steps: + - name: Release New Version + uses: actions/forgejo-release@v1 + with: + direction: upload + url: https://forgejo.neshweb.net + release-dir: release + token: ${{ secrets.FORGEJO_TOKEN }} + tag: ${{ github.ref_name }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..07fb56c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM node:22-alpine +RUN apk -U upgrade && apk add --no-cache git openssh diff --git a/README.md b/README.md index be50fe1..bf3500c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # node-alpine-git -Node Alpine image with git and openssh added \ No newline at end of file +Lightweight node image with git added + +Based on `node:22-alpine`, more versions to come