From 4a7721f6d432ddf4d6ba43291d10b1f4aeca766b Mon Sep 17 00:00:00 2001 From: Niklas Heer Date: Thu, 9 Nov 2023 23:37:48 +0100 Subject: [PATCH] Add manual check --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45fcd15..8bc42ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,45 @@ on: pull_request: types: - labeled + workflow_dispatch: + inputs: + build: + description: 'Name of the earth build to run' + required: true + type: string jobs: + check: + runs-on: ubuntu-latest + if: ${{ inputs.build }} + steps: + - uses: actions/checkout@v3 + - name: Put back the git branch into git (Earthly uses it for tagging) + run: | + branch="" + if [ -n "$GITHUB_HEAD_REF" ]; then + branch="$GITHUB_HEAD_REF" + else + branch="${GITHUB_REF##*/}" + fi + git checkout -b "$branch" || true + - name: Download latest earthly + run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.26/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" + - name: Earthly version + run: earthly --version + - name: Collect data + run: earthly --config earthly-config.yml +${{ inputs.build }} + - name: Analyze data + run: earthly --config earthly-config.yml +analysis + - name: Archive test results + uses: actions/upload-artifact@v3 + with: + name: combined-results + path: | + results/*.json + results/*.csv + results/*.png + build: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' || github.event.review.state == 'approved' || github.event.label.name == 'enable-ci'