From ce18c83bd8d59530a5217a52095c36ede416796e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 18 Oct 2025 00:52:29 +0200 Subject: [PATCH] Hello infra.buildenv --- .gitea/workflows/on-push.yaml | 38 +++++++++++++++++++++++++++++ .gitea/workflows/on-release.yaml | 38 +++++++++++++++++++++++++++++ x86_64-fedora_42-unified/Dockerfile | 28 +++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 .gitea/workflows/on-push.yaml create mode 100644 .gitea/workflows/on-release.yaml create mode 100644 x86_64-fedora_42-unified/Dockerfile diff --git a/.gitea/workflows/on-push.yaml b/.gitea/workflows/on-push.yaml new file mode 100644 index 0000000..3c82f27 --- /dev/null +++ b/.gitea/workflows/on-push.yaml @@ -0,0 +1,38 @@ +name: on-push + +on: + push: + tags-ignore: + - release + branches: + - '**' + +jobs: + buildenv/x86_64-fedora_42-unified: + runs-on: linux + container: code.helloryan.se/art/infra/docker:latest + steps: + - name: Prepare + run: | + export PACKAGE_HOST="$(echo $GITHUB_SERVER_URL | sed s#https://##g)" + echo "PACKAGE_HOST=$PACKAGE_HOST" >> $GITHUB_ENV + export "PACKAGE_IMAGE=$PACKAGE_HOST/$GITHUB_REPOSITORY_OWNER/infra/buildenv/x86_64-fedora_42-unified" + echo "PACKAGE_IMAGE=$PACKAGE_IMAGE" >> $GITHUB_ENV + - name: Configure repository access + run: | + git config --global http.$GITHUB_SERVER_URL/.extraheader "Authorization: token ${{ secrets.ACT_RUNNER_TOKEN }}" + - name: Fetch repository + run: | + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . + git checkout "$GITHUB_SHA" + - name: Build image + run: | + docker build -t "$PACKAGE_IMAGE:$GITHUB_SHA" ./x86_64-fedora_42-unified + - name: Test image + run: | + docker run --rm "$PACKAGE_IMAGE:$GITHUB_SHA" g++ --version + docker run --rm "$PACKAGE_IMAGE:$GITHUB_SHA" b --version + - name: Push image + run: | + echo ${{ secrets.ACT_RUNNER_TOKEN }} | docker login -u "oauth2" --password-stdin "$PACKAGE_HOST" + docker push "$PACKAGE_IMAGE:$GITHUB_SHA" diff --git a/.gitea/workflows/on-release.yaml b/.gitea/workflows/on-release.yaml new file mode 100644 index 0000000..aa55f03 --- /dev/null +++ b/.gitea/workflows/on-release.yaml @@ -0,0 +1,38 @@ +name: on-release + +on: + push: + branches-ignore: + - '**' + tags: + - release + +jobs: + buildenv/x86_64-fedora_42-unified: + runs-on: linux + container: code.helloryan.se/art/infra/docker:latest + steps: + - name: Prepare + run: | + export PACKAGE_HOST="$(echo $GITHUB_SERVER_URL | sed s#https://##g)" + echo "PACKAGE_HOST=$PACKAGE_HOST" >> $GITHUB_ENV + export "PACKAGE_IMAGE=$PACKAGE_HOST/$GITHUB_REPOSITORY_OWNER/infra/buildenv/x86_64-fedora_42-unified" + echo "PACKAGE_IMAGE=$PACKAGE_IMAGE" >> $GITHUB_ENV + - name: Configure repository access + run: | + git config --global http.$GITHUB_SERVER_URL/.extraheader "Authorization: token ${{ secrets.ACT_RUNNER_TOKEN }}" + - name: Fetch repository + run: | + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . + git checkout "$GITHUB_SHA" + - name: Build image + run: | + docker build -t "$PACKAGE_IMAGE:latest" ./x86_64-fedora_42-unified + - name: Test image + run: | + docker run --rm "$PACKAGE_IMAGE:latest" g++ --version + docker run --rm "$PACKAGE_IMAGE:latest" b --version + - name: Push image + run: | + echo ${{ secrets.ACT_RUNNER_TOKEN }} | docker login -u oauth2 --password-stdin "$PACKAGE_HOST" + docker push "$PACKAGE_IMAGE:latest" diff --git a/x86_64-fedora_42-unified/Dockerfile b/x86_64-fedora_42-unified/Dockerfile new file mode 100644 index 0000000..bd68d61 --- /dev/null +++ b/x86_64-fedora_42-unified/Dockerfile @@ -0,0 +1,28 @@ +FROM fedora:42 +LABEL maintainer="Ryan " + +RUN true \ + && dnf -y install \ + clang \ + curl \ + doxygen \ + gcc \ + gcc-plugin-devel \ + git \ + make \ + nodejs \ + openssl \ + rsync \ + sqlite3 \ + wget \ + xxd \ + yarnpkg \ + && dnf clean all + +RUN true \ + && mkdir ~/build2-build \ + && cd ~/build2-build \ + && curl -sSfO https://stage.build2.org/0/0.18.0-a.0/build2-install-0.18.0-a.0-stage.sh \ + && sh build2-install-0.18.0-a.0-stage.sh --yes --trust yes \ + && cd / \ + && rm -rf ~/build2-build