From aee0bf1515773572f648331f2e4feb34ade15588 Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Sun, 26 May 2024 14:13:18 -0700 Subject: [PATCH] test build job --- .gitea/workflows/test.yaml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 9361f0d..6d8ecac 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -55,3 +55,46 @@ jobs: name: jx path: jx - run: echo "This job's status is ${{ job.status }}." + build: + runs-on: ubuntu-latest + container: + image: fedora:latest + env: + GOPATH: / + SSH_AUTH_SOCK: /tmp/ssh.sock + ENVIRONMENT: dev + volumes: + - "/etc/timezone:/etc/timezone:ro" + - "/etc/localtime:/etc/localtime:ro" + - "/etc/gitconfig:/etc/gitconfig:ro" + - "/${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock" + - "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts" + - "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro" + - "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro" + - "/etc/ssl/certs:/etc/ssl/certs:ro" + options: --cpus 10 + steps: + - run: dnf install -y nodejs + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + - run: dnf install -y dnf-plugins-core + - run: dnf builddep build/jx.spec + - name: Run build + run: | + make rpm + - name: Archive binary + uses: actions/upload-artifact@v3 + with: + name: jx + path: jx + - uses: actions/upload-artifact@v3 + with: + path: "/root/rpmbuild/**/*.rpm" + - uses: ncipollo/release-action@v1 + with: + artifacts: + - "jx" + - "/root/rpmbuild/SRPMS/jx-${{ env.VERSION }}-1.fc40.src.rpm" + - "/root/rpmbuild/RPMS/x86_64/jx-${{ env.VERSION }}-1.fc40.x86_64.rpm" + - run: echo "This job's status is ${{ job.status }}."