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 }}."