From 82057f5c6ceed30f6512923714ad88524d71ef99 Mon Sep 17 00:00:00 2001 From: Aditya Prima Date: Sat, 23 Mar 2024 16:47:54 +0700 Subject: [PATCH] Added gitea workflows for version 3.19 --- .gitea/workflows/319.yaml | 32 ++++++++++++++++ Dockerfile | 77 +++++++++++++++++++-------------------- 2 files changed, 70 insertions(+), 39 deletions(-) create mode 100644 .gitea/workflows/319.yaml diff --git a/.gitea/workflows/319.yaml b/.gitea/workflows/319.yaml new file mode 100644 index 0000000..782edd1 --- /dev/null +++ b/.gitea/workflows/319.yaml @@ -0,0 +1,32 @@ +name: Build and Push Alpine Image +on: + push: + branches: + - master + +jobs: + build: + name: Build and push image + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Winter Access Git Registry + uses: docker/login-action@v3 + with: + registry: git.winteraccess.id + username: aditya.prima + password: ${{ secrets.PATOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: deploy/Dockerfile.fpm + build-args: | + ALPINE_VERSION=3.19 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:latest + git.winteraccess.id/${{ gitea.repository }}:3.19 diff --git a/Dockerfile b/Dockerfile index b874578..b6e47b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,38 @@ -ARG ALPINE_VERSION=3.18 - -FROM alpine:${ALPINE_VERSION} AS base -LABEL maintainer=" aprimediet@gmail.com" - -ARG ALPINE_VERSION=3.18 -ARG S6_VERSION=3.1.5.0 -ARG ALPINE_MIRROR=http://foobar.turbo.net.id/alpine -ARG TZ=Asia/Jakarta - -# SET REPOSITORY MIRROR TO INDONESIA -RUN touch /etc/apk/repositories -RUN echo "${ALPINE_MIRROR}/v${ALPINE_VERSION}/main" > /etc/apk/repositories -RUN echo "${ALPINE_MIRROR}/v${ALPINE_VERSION}/community" >> /etc/apk/repositories - -# INSTALL BASE DEPENDENCIES -RUN --mount=type=cache,target=/var/cache/apk \ - apk add --update \ - bash libcap tzdata curl - -# SET LOCAL TIMEZONE -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# Get S6-OVERLAY -ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-noarch.tar.xz /tmp -ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-x86_64.tar.xz /tmp -ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp - -# Install S6-Overlay -RUN tar -Jxpf /tmp/s6-overlay-noarch.tar.xz -C / && \ - tar -Jxpf /tmp/s6-overlay-x86_64.tar.xz -C / && \ - tar -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz -C / - -# Remove S6-Overlay -RUN rm -f /tmp/s6-overlay-noarch.tar.xz && \ - rm -f /tmp/s6-overlay-x86_64.tar.xz && \ - rm -f /tmp/s6-overlay-symlinks-noarch.tar.xz - -ENTRYPOINT [ "/init" ] +ARG ALPINE_VERSION=3.18 + +FROM alpine:${ALPINE_VERSION} AS base +LABEL maintainer=" aprimediet@gmail.com" + +ARG ALPINE_VERSION=3.18 +ARG S6_VERSION=3.1.5.0 +ARG ALPINE_MIRROR=http://foobar.turbo.net.id/alpine +ARG TZ=Asia/Jakarta + +# SET REPOSITORY MIRROR TO INDONESIA +RUN touch /etc/apk/repositories +RUN echo "${ALPINE_MIRROR}/v${ALPINE_VERSION}/main" > /etc/apk/repositories +RUN echo "${ALPINE_MIRROR}/v${ALPINE_VERSION}/community" >> /etc/apk/repositories + +# INSTALL BASE DEPENDENCIES +RUN apk add --update \ + bash libcap tzdata curl + +# SET LOCAL TIMEZONE +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Get S6-OVERLAY +ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-noarch.tar.xz /tmp +ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-x86_64.tar.xz /tmp +ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp + +# Install S6-Overlay +RUN tar -Jxpf /tmp/s6-overlay-noarch.tar.xz -C / && \ + tar -Jxpf /tmp/s6-overlay-x86_64.tar.xz -C / && \ + tar -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz -C / + +# Remove S6-Overlay +RUN rm -f /tmp/s6-overlay-noarch.tar.xz && \ + rm -f /tmp/s6-overlay-x86_64.tar.xz && \ + rm -f /tmp/s6-overlay-symlinks-noarch.tar.xz + +ENTRYPOINT [ "/init" ]