From 1916eb44560314c78f233dfa80aa666604a8e39f Mon Sep 17 00:00:00 2001 From: levisingularity Date: Wed, 11 Dec 2024 17:57:26 -0300 Subject: [PATCH] Fix pipeline version --- .../{run-tests.yml => build-and-run-tests.yml} | 14 ++++++++++++-- .github/workflows/{build.yml => deploy.yml} | 6 ++++-- 2 files changed, 16 insertions(+), 4 deletions(-) rename .github/workflows/{run-tests.yml => build-and-run-tests.yml} (81%) rename .github/workflows/{build.yml => deploy.yml} (93%) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/build-and-run-tests.yml similarity index 81% rename from .github/workflows/run-tests.yml rename to .github/workflows/build-and-run-tests.yml index 71686c9..91dc0e7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -1,10 +1,20 @@ --- -name: Run DAS-CLI tests +name: Build DAS-CLI and run tests on: workflow_dispatch: + inputs: + version: + required: false + description: DAS-CLI version + type: string workflow_call: + inputs: + version: + required: false + description: DAS-CLI version + type: string pull_request: types: @@ -24,7 +34,7 @@ jobs: run: docker build -f .docker/Dockerfile.das-toolbox -t das-cli:latest . - name: Build das-cli binary - run: docker run --rm -v "$(pwd)/dist/":/app/das/dist -e DAS_CLI_VERSION=0.1.0 das-cli:latest + run: docker run --rm -v "$(pwd)/dist/":/app/das/dist -e DAS_CLI_VERSION=${{github.event.inputs.version || '0.1.0'}} das-cli:latest - name: Upload das-cli artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/deploy.yml similarity index 93% rename from .github/workflows/build.yml rename to .github/workflows/deploy.yml index 737439f..2eea221 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ --- -name: DAS CLI Build +name: DAS CLI Deployment on: workflow_dispatch: @@ -31,7 +31,9 @@ jobs: build-and-run-tests: if: github.ref == 'refs/heads/master' - uses: ./.github/workflows/run-tests.yml + uses: ./.github/workflows/build-and-run-tests.yml + with: + version: ${{github.event.inputs.version}} tag: needs: build-and-run-tests