Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(web, server): fix blank/null value issue with info #494

Merged
merged 7 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
args: release --rm-dist ${{ env.SNAPSHOT }}
workdir: server
env:
SNAPSHOT: ${{ !github.event.inputs.new_tag && '--snapshot' || '' }}
GORELEASER_CURRENT_TAG: ${{ github.event.inputs.new_tag || '0.0.0' }}
SNAPSHOT: ${{ github.event.inputs.new_tag != 'blank' && '--snapshot' || '' }}
GORELEASER_CURRENT_TAG: ${{ github.event.inputs.new_tag == 'blank' && '0.0.0' || github.event.inputs.new_tag }}
- name: Rename artifacts
if: github.event.inputs.name
if: ${{ github.event.inputs.name != 'blank' }}
run: for f in $ARTIFACTS; do mv $f $(echo $f | sed -E 's/_0\.0\.0-SNAPSHOT-[^_]*/_${{ github.event.inputs.name }}/'); done
- name: List artifacts
run: ls -l server/dist
- name: Release nightly/rc
if: github.event.inputs.name
if: ${{ github.event.inputs.name != 'blank' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
Expand All @@ -58,13 +58,13 @@ jobs:
body: ${{ github.event.inputs.sha_short }}
prerelease: true
- name: Download latest changelog
if: github.event.inputs.new_tag
if: ${{ github.event.inputs.new_tag != 'blank' }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: release.yml
name: changelog-${{ github.event.inputs.new_tag }}
- name: Create GitHub release
if: github.event.inputs.new_tag
if: ${{ github.event.inputs.new_tag != 'blank' }}
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACTS }}
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Get options
id: options
env:
TAG: ${{ github.event.inputs.new_tag_short }}
TAG: ${{ github.event.inputs.new_tag_short && github.event.inputs.new_tag_short != 'blank' && github.event.inputs.new_tag_short || '' }}
NAME: ${{ github.event.inputs.name }}
SHA: ${{ github.event.inputs.sha_short }}
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
name: Release nightly/rc
runs-on: ubuntu-latest
needs: [build-web]
if: github.event.inputs.name
if: ${{ github.event.inputs.name != 'blank' }}
env:
ARTIFACT: reearth-web_${{ github.event.inputs.name }}.tar.gz
steps:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
working-directory: server
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Get options
id: options
env:
TAG: ${{ github.event.inputs.new_tag_short }}
TAG: ${{ github.event.inputs.new_tag_short && github.event.inputs.new_tag_short != 'blank' && github.event.inputs.new_tag_short || '' }}
NAME: ${{ github.event.inputs.name }}
SHA: ${{ github.event.inputs.sha_short }}
run: |
Expand All @@ -134,8 +134,8 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: reearth/reearth
version: tags/${{ github.event.inputs.name || needs.info.outputs.tag }}
file: reearth-web_${{ github.event.inputs.name || needs.info.outputs.tag }}.tar.gz
version: tags/${{ github.event.inputs.name || github.event.inputs.tag }}
file: reearth-web_${{ github.event.inputs.name || github.event.inputs.tag }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
target: server/reearth-web.tar.gz
- name: Extract reearth/web
Expand All @@ -154,7 +154,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.event.inputs.new_tag
if: ${{ github.event.inputs.new_tag != 'blank' }}
env:
ARTIFACT: reearth-web_${{ github.event.inputs.new_tag }}.tar.gz
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ci
on:
push:
branches: [main, release/*, release, dummy-workflow]
branches: [main, release/*, release]
pull_request:
jobs:
prepare:
Expand Down
Loading