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

github workflows for access-api add URLs to dev/staging/production envs #157

Merged
merged 2 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .github/workflows/access-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ jobs:
uses: './.github/workflows/reuse-deploy-api.yml'
with:
environment: staging
environment_url: https://w3access-staging.protocol-labs.workers.dev
secrets: inherit
deploy-dev:
needs: test
if: github.event_name == 'pull_request' && !contains(github.head_ref, 'release-please--branches')
uses: './.github/workflows/reuse-deploy-api.yml'
with:
environment: dev
environment_url: https://w3access-dev.protocol-labs.workers.dev
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ jobs:
uses: './.github/workflows/reuse-deploy-api.yml'
with:
environment: production
environment_url: https://access.web3.storage
secrets: inherit
8 changes: 7 additions & 1 deletion .github/workflows/reuse-deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
environment:
required: true
type: string
environment_url:
description: URL of the deployed environment. If provided, this will be added to the GitHub environment.
required: false
type: string
secrets:
CF_TOKEN:
required: true
Expand All @@ -24,7 +28,9 @@ on:
jobs:
deploy-api:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
environment:
name: ${{ inputs.environment }}
url: ${{ inputs.environment_url }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.3
Expand Down