From 5c903ba3607939aa2d9429782242193e773d8c0a Mon Sep 17 00:00:00 2001 From: Alex Prudencio Date: Tue, 24 Sep 2024 22:00:06 -0400 Subject: [PATCH] adding pr build wf --- .gitea/workflows/build-pr.yaml | 14 ++++++++++++++ .gitea/workflows/build.yaml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/build-pr.yaml diff --git a/.gitea/workflows/build-pr.yaml b/.gitea/workflows/build-pr.yaml new file mode 100644 index 0000000..6e60fb7 --- /dev/null +++ b/.gitea/workflows/build-pr.yaml @@ -0,0 +1,14 @@ +name: PR Builder +run-name: ${{ gitea.actor }} building PR +on: [pull_request] + +jobs: + Build-PR: + runs-on: ubuntu-22.04 + steps: + - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event on branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Build PR + if: gitea.base_ref == 'main' + run: | + git clone --single-branch --branch ${{ gitea.head_ref }} https://git.primefactorsolutions.com/PFS/pfs-intra.git && cd pfs-intra && ./mvnw clean package -Pproduction + - run: echo "This job's status is ${{ job.status }}." diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 019f9d0..e64cc3a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -12,5 +12,5 @@ jobs: - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event on branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Build package run: | - git clone https://git.primefactorsolutions.com/PFS/pfs-intra.git && cd pfs-intra && ./mvnw clean package -Pproduction && unlink /home/ubuntu/pfs-intra/app.jar && cp target/*.jar /home/ubuntu/pfs-intra/app.jar && sudo systemctl restart pfs-intra + git clone --single-branch --branch main https://git.primefactorsolutions.com/PFS/pfs-intra.git && cd pfs-intra && ./mvnw clean package -Pproduction && unlink /home/ubuntu/pfs-intra/app.jar && cp target/*.jar /home/ubuntu/pfs-intra/app.jar && sudo systemctl restart pfs-intra - run: echo "This job's status is ${{ job.status }}."