Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Web application release process | |
on: | |
release: | |
types: [ released ] | |
env: | |
NODE_VERSION: "20" | |
jobs: | |
web_pipeline: | |
name: Build and deploy web application | |
runs-on: ubuntu-latest | |
env: | |
ENV_NAME : prd | |
CLOUDSDK_CORE_PROJECT : web-based-gtfs-validator | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# We need to download all tags so that the axion-release-plugin | |
# can resolve the most recent version tag. | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
# We need a recent version of Java with jpackage included. | |
java-version: '17' | |
# We use the zulu distribution, which is an OpenJDK distro. | |
distribution: 'zulu' | |
# for npm | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GCP_WEB_VALIDATOR_SA_KEY }} | |
- uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: '>= 390.0.0' | |
- name: run pipeline | |
shell: bash | |
run: | | |
ENV_FILE=web/pipeline/${ENV_NAME}.env source web/pipeline/env-file.sh | |
./gradlew webCD | |
- name: Load secrets from 1Password to be used for sending notification | |
id: onepw_secrets | |
uses: 1password/load-secrets-action@v2.0.0 | |
with: | |
export-env: true # Export loaded secrets as environment variables | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
CREDENTIALS: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/ifkeehu5gzi7wy5ub5qvwkaire/credential" | |
- name: Send a notification to mobility-feed-api | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ env.CREDENTIALS }} | |
repository: MobilityData/mobility-feed-api | |
event-type: gtfs-validator-release |