diff --git a/.gitea/workflows/on-push.yaml b/.gitea/workflows/on-push.yaml index 9df0940..15f1631 100644 --- a/.gitea/workflows/on-push.yaml +++ b/.gitea/workflows/on-push.yaml @@ -2,10 +2,19 @@ name: on-push on: [push] jobs: - build: + infra/buildenv/cxx-amd64-fedora-40: runs-on: linux - container: - image: fedora:latest + container: code.helloryan.se/infra/misc/docker:latest steps: + - name: Clone repository + uses: actions/checkout@v3 + - name: Login + run: echo ${{ secrets.INFRA_ACCESS_TOKEN }} | docker login -u ${{ gitea.actor }} --password-stdin code.helloryan.se + - name: Build + run: docker buildx build -t code.helloryan.se/infra/buildenv/cxx-amd64-fedora-40:${{ gitea.sha }} cxx-amd64-fedora-40 - name: Test - run: echo Hello + run: docker run --rm code.helloryan.se/infra/buildenv/cxx-amd64-fedora-40:${{ gitea.sha }} g++ --version + - name: Tag + run: docker tag code.helloryan.se/infra/buildenv/cxx-amd64-fedora-40:${{ gitea.sha }} code.helloryan.se/infra/buildenv/cxx-amd64-fedora-40:latest + - name: Push + run: docker push code.helloryan.se/infra/buildenv/cxx-amd64-fedora-40:latest diff --git a/cxx-amd64-fedora-40/Dockerfile b/cxx-amd64-fedora-40/Dockerfile new file mode 100644 index 0000000..e2017e4 --- /dev/null +++ b/cxx-amd64-fedora-40/Dockerfile @@ -0,0 +1,14 @@ +FROM fedora:40 + +RUN true \ + && dnf -y update \ + && dnf -y install wget curl g++ openssl git make nodejs \ + && dnf clean all + +RUN true \ + && mkdir ~/build2-build \ + && cd ~/build2-build \ + && curl -sSfO https://download.build2.org/0.16.0/build2-install-0.16.0.sh \ + && sh build2-install-0.16.0.sh --yes --trust yes \ + && cd / \ + && rm -rf ~/build2-build