chore(actions): Minor improvements to the release scripts.
This commit is contained in:
parent
e646209da4
commit
e2c52c47a5
|
@ -20,6 +20,7 @@ permissions:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||||
|
IS_PRERELEASE: ${{ github.event.release.prerelease == true || github.event.inputs.PRERELEASE }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ===============================================================
|
# ===============================================================
|
||||||
|
@ -57,14 +58,17 @@ jobs:
|
||||||
|
|
||||||
- name: Extract artifacts
|
- name: Extract artifacts
|
||||||
run: |
|
run: |
|
||||||
|
echo "Event prerelease ${{ github.event.release.prerelease }}"
|
||||||
|
echo "Input prerelease ${{ github.event.inputs.PRERELEASE }}"
|
||||||
|
echo "env.IS_PRERELEASE ${{ env.IS_PRERELEASE}} "
|
||||||
ls -l
|
ls -l
|
||||||
ls -l releases
|
ls -l releases
|
||||||
for f in releases/*.tar.gz; do tar xvfz $f -C releases; done
|
for f in releases/*.tar.gz; do tar xvfz $f -C releases; done
|
||||||
rm releases/*.tar.gz
|
rm releases/*.tar.gz
|
||||||
|
|
||||||
- name: Build release image
|
- name: Build release image
|
||||||
if: ${{ !github.event.release.prerelease && !github.event.inputs.PRERELEASE }}
|
if: env.IS_PRERELEASE == 'false'
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
@ -85,8 +89,8 @@ jobs:
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
|
|
||||||
- name: Build pre-release image
|
- name: Build pre-release image
|
||||||
if: ${{ github.event.release.prerelease || github.event.inputs.PRERELEASE }}
|
if: env.IS_PRERELEASE == true
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
@ -102,10 +102,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Work around https://github.com/actions/checkout/issues/766
|
# Work around https://github.com/actions/checkout/issues/766
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
git describe --always --tags ${{ github.sha }}
|
git describe --always --tags ${{ github.sha }}
|
||||||
VERSION=$(git describe --always --tags ${{ github.sha }})
|
|
||||||
echo "::set-output name=version::${VERSION}"
|
|
||||||
./tools/release.sh
|
./tools/release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
Loading…
Reference in New Issue