From eb4b283d05937f5cafa893f06a85a8d1f7bf73a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20V=C6=B0=C6=A1ng?= Date: Wed, 8 Jan 2025 22:53:04 +0700 Subject: [PATCH] update: modify version retrieval step in release workflow to use a script --- .github/actions/get-version/action.yml | 13 ------------- .github/workflows/release-and-publish.yml | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 .github/actions/get-version/action.yml diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml deleted file mode 100644 index e176df3..0000000 --- a/.github/actions/get-version/action.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Get Version - -runs: - using: composite - - steps: - - name: Get version from script - run: | - wget https://raw.githubusercontent.com/lzaycoe/brainbox-deployment/refs/heads/main/scripts/get-version.sh - sudo apt-get install jq - chmod +x ./get-version.sh - echo "version=$(./get-version.sh ./package.json)" >> $GITHUB_OUTPUT - shell: bash diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 62e30d0..fb1b0f2 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -23,9 +23,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Get Version + - name: Get version from script id: get_version - uses: ./.github/actions/get-version + run: | + wget https://raw.githubusercontent.com/lzaycoe/brainbox-deployment/refs/heads/main/scripts/get-version.sh + sudo apt-get install jq + chmod +x ./get-version.sh + echo "version=$(./get-version.sh ./package.json)" >> $GITHUB_OUTPUT + shell: bash - name: Release uses: softprops/action-gh-release@v2 @@ -48,9 +53,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Get Version + - name: Get version from script id: get_version - uses: ./.github/actions/get-version + run: | + wget https://raw.githubusercontent.com/lzaycoe/brainbox-deployment/refs/heads/main/scripts/get-version.sh + sudo apt-get install jq + chmod +x ./get-version.sh + echo "version=$(./get-version.sh ./package.json)" >> $GITHUB_OUTPUT + shell: bash - name: Login ghcr.io uses: docker/login-action@v3