From d075c3bd8fd4d00af40202d6f87c0a7852cf710e Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Sun, 9 May 2021 16:44:29 +0200 Subject: [PATCH 01/12] Improve Github Actions --- .github/workflows/main.yml | 56 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c920a89e..cb0a62ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: push: branches: - master - pull_request: + pull_request_target: jobs: validate: @@ -12,6 +12,19 @@ jobs: steps: - name: Checkout the source code uses: actions/checkout@master + - name: Checkout pull request + uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request_target' }} + with: + path: pullrequest + ref: 'refs/pull/${{ github.event.number }}/merge' + - name: Replace addons with pull request addons + if: ${{ github.event_name == 'pull_request_target' }} + run: | + rm -r addons + rm -r optionals + cp -r pullrequest/addons addons + cp -r pullrequest/optionals optionals - name: Validate SQF run: python3 tools/sqf_validator.py - name: Validate Config @@ -32,6 +45,19 @@ jobs: steps: - name: Checkout the source code uses: actions/checkout@master + - name: Checkout pull request + uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request_target' }} + with: + path: pullrequest + ref: 'refs/pull/${{ github.event.number }}/merge' + - name: Replace addons with pull request addons + if: ${{ github.event_name == 'pull_request_target' }} + run: | + rm -r addons + rm -r optionals + cp -r pullrequest/addons addons + cp -r pullrequest/optionals optionals - name: Lint (sqflint) uses: jokoho48/sqflint@master continue-on-error: true # No failure due to many false-positives @@ -47,8 +73,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - with: - fetch-depth: 1 + - name: Checkout pull request + uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request_target' }} + with: + path: pullrequest + ref: 'refs/pull/${{ github.event.number }}/merge' + - name: Replace addons with pull request addons + if: ${{ github.event_name == 'pull_request_target' }} + run: | + rm -r addons + rm -r optionals + cp -r pullrequest/addons addons + cp -r pullrequest/optionals optionals - name: Build addon with HEMTT uses: arma-actions/hemtt@master with: @@ -69,6 +106,19 @@ jobs: pip3 install pygithub3 - name: Checkout the source code uses: actions/checkout@master + - name: Checkout pull request + uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request_target' }} + with: + path: pullrequest + ref: 'refs/pull/${{ github.event.number }}/merge' + - name: Replace addons with pull request addons + if: ${{ github.event_name == 'pull_request_target' }} + run: | + rm -r addons + rm -r optionals + cp -r pullrequest/addons addons + cp -r pullrequest/optionals optionals - name: Validate Stringtables run: python3 tools/stringtable_validator.py - name: Update Translation issue From 63672a7c7e5534108f17ffe63ea6e1ab921e2304 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Sun, 9 May 2021 16:47:31 +0200 Subject: [PATCH 02/12] dont need to do optionals we dont have --- .github/workflows/main.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb0a62ba..eb72b26f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,9 +22,7 @@ jobs: if: ${{ github.event_name == 'pull_request_target' }} run: | rm -r addons - rm -r optionals cp -r pullrequest/addons addons - cp -r pullrequest/optionals optionals - name: Validate SQF run: python3 tools/sqf_validator.py - name: Validate Config @@ -55,9 +53,7 @@ jobs: if: ${{ github.event_name == 'pull_request_target' }} run: | rm -r addons - rm -r optionals cp -r pullrequest/addons addons - cp -r pullrequest/optionals optionals - name: Lint (sqflint) uses: jokoho48/sqflint@master continue-on-error: true # No failure due to many false-positives @@ -83,9 +79,7 @@ jobs: if: ${{ github.event_name == 'pull_request_target' }} run: | rm -r addons - rm -r optionals cp -r pullrequest/addons addons - cp -r pullrequest/optionals optionals - name: Build addon with HEMTT uses: arma-actions/hemtt@master with: @@ -116,9 +110,7 @@ jobs: if: ${{ github.event_name == 'pull_request_target' }} run: | rm -r addons - rm -r optionals cp -r pullrequest/addons addons - cp -r pullrequest/optionals optionals - name: Validate Stringtables run: python3 tools/stringtable_validator.py - name: Update Translation issue From f9fe8e5d6a22ac7aa1e167c2a212550fc63b0351 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Sun, 9 May 2021 16:49:16 +0200 Subject: [PATCH 03/12] fix PR --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb72b26f..7620af9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: branches: - master pull_request_target: - + jobs: validate: runs-on: ubuntu-latest From 41f1f4ad04db8efab415290dce6a01149dbb84a1 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:15:35 +0200 Subject: [PATCH 04/12] use custom hemtt version for building --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7620af9e..4ec2294e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,7 @@ jobs: rm -r addons cp -r pullrequest/addons addons - name: Build addon with HEMTT - uses: arma-actions/hemtt@master + uses: jokoh48/hemtt-action@master with: command: 'build --release' - uses: actions/upload-artifact@master From 5271b7e37e6a807a7135acc71bb5d9b72a628040 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:19:05 +0200 Subject: [PATCH 05/12] fix error in yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ec2294e..fe4e2e07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - name: Checkout pull request uses: actions/checkout@v2 if: ${{ github.event_name == 'pull_request_target' }} From 1b517838cd8bc57d6d253ef994a7bbac137953ba Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:21:56 +0200 Subject: [PATCH 06/12] fix some more yml issues --- .github/workflows/main.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe4e2e07..a90ee6f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,9 +20,7 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: | - rm -r addons - cp -r pullrequest/addons addons + run: rm -r addons && cp -r pullrequest/addons addons - name: Validate SQF run: python3 tools/sqf_validator.py - name: Validate Config @@ -51,9 +49,7 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: | - rm -r addons - cp -r pullrequest/addons addons + run: rm -r addons && cp -r pullrequest/addons addons - name: Lint (sqflint) uses: jokoho48/sqflint@master continue-on-error: true # No failure due to many false-positives @@ -76,9 +72,7 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: | - rm -r addons - cp -r pullrequest/addons addons + run: rm -r addons && cp -r pullrequest/addons addons - name: Build addon with HEMTT uses: jokoh48/hemtt-action@master with: @@ -92,11 +86,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Python packages - run: | - pip3 install wheel - pip3 install setuptools - pip3 install pygithub - pip3 install pygithub3 + run: pip3 install wheel setuptools pygithub pygithub3 - name: Checkout the source code uses: actions/checkout@master - name: Checkout pull request @@ -107,9 +97,7 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: | - rm -r addons - cp -r pullrequest/addons addons + run: rm -r addons && cp -r pullrequest/addons addons - name: Validate Stringtables run: python3 tools/stringtable_validator.py - name: Update Translation issue From c4e37a6318135b45eef1d5c14cdc941a9e4b833f Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:26:11 +0200 Subject: [PATCH 07/12] why yaml just why --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a90ee6f9..d9c1106c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,14 +73,14 @@ jobs: - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} run: rm -r addons && cp -r pullrequest/addons addons - - name: Build addon with HEMTT - uses: jokoh48/hemtt-action@master - with: - command: 'build --release' - - uses: actions/upload-artifact@master - with: - name: '@LambsDanger' - path: 'releases/@LambsDanger*.zip' + - name: Build addon with HEMTT + uses: jokoh48/hemtt-action@master + with: + command: 'build --release' + - uses: actions/upload-artifact@master + with: + name: '@LambsDanger' + path: 'releases/@LambsDanger*.zip' stringtables: runs-on: ubuntu-latest From cf6dfa4f0821df06c984dbdbfc13e23423798f7d Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:29:36 +0200 Subject: [PATCH 08/12] fix a tab in the yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9c1106c..dc9020a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,7 +80,7 @@ jobs: - uses: actions/upload-artifact@master with: name: '@LambsDanger' - path: 'releases/@LambsDanger*.zip' + path: 'releases/@LambsDanger*.zip' stringtables: runs-on: ubuntu-latest @@ -101,7 +101,7 @@ jobs: - name: Validate Stringtables run: python3 tools/stringtable_validator.py - name: Update Translation issue - if: github.repository == 'nk3nny/LambsDanger' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]') + if: github.repository == 'nk3nny/LambsDanger' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: python3 tools/stringtableDeploy.py From b5eb5551d0d4a76a6a41e8aca5c3642ec3dcdb83 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:30:18 +0200 Subject: [PATCH 09/12] how can a yml be this terrible --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc9020a3..03a03cbb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,7 +80,7 @@ jobs: - uses: actions/upload-artifact@master with: name: '@LambsDanger' - path: 'releases/@LambsDanger*.zip' + path: 'releases/@LambsDanger*.zip' stringtables: runs-on: ubuntu-latest From 0f17f280ecd868b96536de57ebedbed099ec7f4d Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:32:29 +0200 Subject: [PATCH 10/12] just asking yaml why? --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03a03cbb..93aaa65d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,8 +55,8 @@ jobs: continue-on-error: true # No failure due to many false-positives - uses: actions/upload-artifact@master with: - name: 'sqfLint Log' - path: 'sqf.log' + name: 'sqfLint Log' + path: 'sqf.log' - name: Validate SQFLinter Logs run: python3 tools/sqf_linter_LogChecker.py From 1699cbb4d4c37f273be87d5e8835f5afce3685a5 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:35:10 +0200 Subject: [PATCH 11/12] yaml pls? --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93aaa65d..aa9fefa2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,7 +60,6 @@ jobs: - name: Validate SQFLinter Logs run: python3 tools/sqf_linter_LogChecker.py - build: runs-on: ubuntu-latest steps: From 9b1a9f9cf5ad830efba04b8a59cf1117e848ce76 Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Fri, 25 Jun 2021 02:41:45 +0200 Subject: [PATCH 12/12] do you even yaml? --- .github/workflows/main.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa9fefa2..9cc43768 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,9 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: rm -r addons && cp -r pullrequest/addons addons + run: | + rm -r addons + cp -r pullrequest/addons addons - name: Validate SQF run: python3 tools/sqf_validator.py - name: Validate Config @@ -49,7 +51,9 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: rm -r addons && cp -r pullrequest/addons addons + run: | + rm -r addons + cp -r pullrequest/addons addons - name: Lint (sqflint) uses: jokoho48/sqflint@master continue-on-error: true # No failure due to many false-positives @@ -71,7 +75,9 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: rm -r addons && cp -r pullrequest/addons addons + run: | + rm -r addons + cp -r pullrequest/addons addons - name: Build addon with HEMTT uses: jokoh48/hemtt-action@master with: @@ -96,7 +102,9 @@ jobs: ref: 'refs/pull/${{ github.event.number }}/merge' - name: Replace addons with pull request addons if: ${{ github.event_name == 'pull_request_target' }} - run: rm -r addons && cp -r pullrequest/addons addons + run: | + rm -r addons + cp -r pullrequest/addons addons - name: Validate Stringtables run: python3 tools/stringtable_validator.py - name: Update Translation issue