mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
chore(actions): Minor improvements to the release scripts.
This commit is contained in:
parent
e646209da4
commit
e2c52c47a5
2 changed files with 8 additions and 7 deletions
12
.github/workflows/docker-release.yml
vendored
12
.github/workflows/docker-release.yml
vendored
|
@ -20,6 +20,7 @@ permissions:
|
|||
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||
IS_PRERELEASE: ${{ github.event.release.prerelease == true || github.event.inputs.PRERELEASE }}
|
||||
|
||||
jobs:
|
||||
# ===============================================================
|
||||
|
@ -57,14 +58,17 @@ jobs:
|
|||
|
||||
- name: Extract artifacts
|
||||
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 releases
|
||||
for f in releases/*.tar.gz; do tar xvfz $f -C releases; done
|
||||
rm releases/*.tar.gz
|
||||
|
||||
- name: Build release image
|
||||
if: ${{ !github.event.release.prerelease && !github.event.inputs.PRERELEASE }}
|
||||
uses: docker/build-push-action@v2
|
||||
if: env.IS_PRERELEASE == 'false'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
@ -85,8 +89,8 @@ jobs:
|
|||
cache-to: type=inline
|
||||
|
||||
- name: Build pre-release image
|
||||
if: ${{ github.event.release.prerelease || github.event.inputs.PRERELEASE }}
|
||||
uses: docker/build-push-action@v2
|
||||
if: env.IS_PRERELEASE == true
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -102,10 +102,7 @@ jobs:
|
|||
run: |
|
||||
# Work around https://github.com/actions/checkout/issues/766
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
git describe --always --tags ${{ github.sha }}
|
||||
VERSION=$(git describe --always --tags ${{ github.sha }})
|
||||
echo "::set-output name=version::${VERSION}"
|
||||
./tools/release.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
Loading…
Reference in a new issue