diff --git a/.github/workflows/gitlab-helper.yml b/.github/workflows/gitlab-helper.yml index 16710c5713..9dc8ff5550 100644 --- a/.github/workflows/gitlab-helper.yml +++ b/.github/workflows/gitlab-helper.yml @@ -1,6 +1,7 @@ -# This workflow runs on PRs and the merge queue and is only responsible for -# starting the "Start GitLab CI" workflow in a way that makes it possible to -# use secrets. +# This workflow runs on PRs and the merge queue and is responsible for starting +# the "Start GitLab CI" workflow in a way that makes it possible to use +# secrets. The workflow first runs source preparation to make sure that the +# gitlab-ci.yml is up to date. --- name: GitLab @@ -12,6 +13,39 @@ on: merge_group: jobs: + prepare: + name: "🔍 Check source preparation" + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.20 + uses: actions/setup-go@v5 + with: + go-version: "1.20" + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev + + - name: Check that source has been prepared + run: | + ./tools/prepare-source.sh + if [ -n "$(git status --porcelain)" ]; then + echo + echo "Please include these changes in your branch: " + git status -vv + exit "1" + else + exit "0" + fi + gitlab-ci-helper: name: "Gitlab CI trigger helper" runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 40852a0210..64f00f9af8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -136,34 +136,6 @@ jobs: version: v1.54.2 args: --verbose --timeout 5m0s - prepare: - name: "🔍 Check source preparation" - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.20 - uses: actions/setup-go@v5 - with: - go-version: "1.20" - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Check that source has been prepared - run: | - ./tools/prepare-source.sh - if [ -n "$(git status --porcelain)" ]; then - echo - echo "Please include these changes in your branch: " - git status -vv - exit "1" - else - exit "0" - fi - shellcheck: name: "🐚 Shellcheck" runs-on: ubuntu-latest