Refactor build workflow to improve branch checking and fetch depth

This commit is contained in:
mr. M
2024-10-13 02:26:39 +02:00
parent bdbce8a7da
commit b87b9d3e26

View File

@@ -58,15 +58,12 @@ jobs:
runs-on: ubuntu-latest
needs: [debug-inputs]
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.DEPLOY_KEY }}
fetch-depth: 0
- name: Check if correct branch
run: |
@@ -87,19 +84,6 @@ jobs:
echo ">>> Branch matches"
fi
- name: Check if branch is up to date
run: |
echo "Checking if branch is up to date"
git fetch
git pull
git status
if [[ $(git status) == *"Your branch is up to date with"* ]]; then
echo ">>> Branch is up to date"
else
echo ">>> Branch is not up to date"
exit 1
fi
build-data:
permissions:
contents: write