From 7eb245d7eebb6c1b41a84691a4dc6ec65d9bdb52 Mon Sep 17 00:00:00 2001 From: katexochen <49727155+katexochen@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:59:46 +0200 Subject: [PATCH] Checkout last instead of merge commit in workflows --- .github/workflows/build-binaries.yml | 41 ++++++++++++++++---------- .github/workflows/check-licenses.yml | 2 ++ .github/workflows/check-links.yml | 5 +++- .github/workflows/docs-vale.yml | 2 ++ .github/workflows/test-govulncheck.yml | 2 ++ .github/workflows/test-integration.yml | 2 ++ .github/workflows/test-lint.yml | 2 ++ .github/workflows/test-shellcheck.yml | 3 ++ .github/workflows/test-tidy.yml | 2 ++ .github/workflows/test-unittest.yml | 2 ++ 10 files changed, 46 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 72d580fed..74c94ee6b 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -21,42 +21,48 @@ jobs: build-bootstrapper: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f with: go-version: "1.19.1" - - name: Check out repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - - name: Build the bootstrapper uses: ./.github/actions/build_bootstrapper build-debugd: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f with: go-version: "1.19.1" - - name: Check out repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - - name: Build debugd uses: ./.github/actions/build_debugd build-cdbg: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f with: go-version: "1.19.1" - - name: Check out repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - - name: Build cdbg (Linux, amd64) uses: ./.github/actions/build_cdbg with: @@ -84,28 +90,31 @@ jobs: build-disk-mapper: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f with: go-version: "1.19.1" - - - name: Check out repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - - name: Build disk-mapper uses: ./.github/actions/build_disk_mapper build-cli: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f with: go-version: "1.19.1" - - name: Check out repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - - name: Build CLI (Linux, amd64) uses: ./.github/actions/build_cli with: diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index acc03f9da..259d27940 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 2e7638892..e13c7f659 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -16,7 +16,10 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Link Checker uses: lycheeverse/lychee-action@4a5af7cd2958a2282cefbd9c10f63bdb89982d76 diff --git a/.github/workflows/docs-vale.yml b/.github/workflows/docs-vale.yml index e99941126..6ad7dcb0a 100644 --- a/.github/workflows/docs-vale.yml +++ b/.github/workflows/docs-vale.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Vale uses: errata-ai/vale-action@753427452ff1d6cf7a7b76a552aa0cbee3971551 with: diff --git a/.github/workflows/test-govulncheck.yml b/.github/workflows/test-govulncheck.yml index f90898533..f757628fa 100644 --- a/.github/workflows/test-govulncheck.yml +++ b/.github/workflows/test-govulncheck.yml @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install Dependencies run: sudo apt-get update && sudo apt-get -y install libcryptsetup-dev libvirt-dev diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 5298fdf43..2e388e515 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 7386d945e..3e123e5da 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -27,6 +27,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install Dependencies run: sudo apt-get update && sudo apt-get -y install libcryptsetup-dev libvirt-dev diff --git a/.github/workflows/test-shellcheck.yml b/.github/workflows/test-shellcheck.yml index d1be2420c..55e8a95cd 100644 --- a/.github/workflows/test-shellcheck.yml +++ b/.github/workflows/test-shellcheck.yml @@ -21,6 +21,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Run ShellCheck uses: ludeeus/action-shellcheck@203a3fd018dfe73f8ae7e3aa8da2c149a5f41c33 with: diff --git a/.github/workflows/test-tidy.yml b/.github/workflows/test-tidy.yml index 93da8892c..b6b459f4e 100644 --- a/.github/workflows/test-tidy.yml +++ b/.github/workflows/test-tidy.yml @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f diff --git a/.github/workflows/test-unittest.yml b/.github/workflows/test-unittest.yml index b35844102..3b3877be5 100644 --- a/.github/workflows/test-unittest.yml +++ b/.github/workflows/test-unittest.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Go environment uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f