Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
chore: set up cd workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed May 28, 2021
1 parent 7a6ed38 commit a6f0f59
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 19 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy_test.yml
@@ -0,0 +1,37 @@
name: deploy_test
on:
workflow_run:
workflows:
- nightly
types:
- completed
env:
REEARTH_URL: test.reearth.dev
GCS_DEST: gs://test.reearth.dev/
jobs:
deploy_test:
name: deploy_test
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/download-artifact@v2
with:
name: nightly
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '341.0.0'
project_id: ${{ secrets.GCP_PROJECT }}
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: put reearth_config.json
run: curl -L -o reearth-web/reearth_config.json https://${{ env.REEARTH_URL }}/reearth_config.json
- name: rsync
run: gsutil -m -h "Cache-Control:no-store" rsync -dr reearth-web/ ${{ env.GCS_DEST }}
- name: Slack Notification
uses: Gamesight/slack-workflow-status@master
if: always()
continue-on-error: true
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
16 changes: 7 additions & 9 deletions .github/workflows/main.yml
Expand Up @@ -32,12 +32,10 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
# - name: Slack Notification
# uses: 8398a7/action-slack@v3
# if: always()
# with:
# status: ${{ job.status }}
# fields: repo,commit,action,workflow
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Slack Notification
uses: Gamesight/slack-workflow-status@master
if: always()
continue-on-error: true
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
14 changes: 13 additions & 1 deletion .github/workflows/nightly.yml
Expand Up @@ -35,10 +35,22 @@ jobs:
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: nightly.tar.gz
artifacts: reearth-web_nightly.tar.gz
artifactContentType: application/gzip
commit: ${{ env.GITHUB_SHA }}
name: Nightly release
prerelease: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: nightly
path: reearth-web
if-no-files-found: error
- name: Slack Notification
uses: Gamesight/slack-workflow-status@master
if: always()
continue-on-error: true
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
16 changes: 7 additions & 9 deletions .github/workflows/pr.yml
Expand Up @@ -36,12 +36,10 @@ jobs:
GITHUB_PR_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
# - name: Slack Notification
# uses: 8398a7/action-slack@v3
# if: always()
# with:
# status: ${{ job.status }}
# fields: repo,commit,action,workflow
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Slack Notification
uses: Gamesight/slack-workflow-status@master
if: always()
continue-on-error: true
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit a6f0f59

Please sign in to comment.