This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use node 18 and fix cache folder issue
- Loading branch information
Showing
6 changed files
with
247 additions
and
4,778 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build branch | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- run: npm ci | ||
- run: npm test | ||
build-latest: | ||
name: Build branch | ||
runs-on: ubuntu-latest | ||
env: | ||
PROJECT_ID: ${{ secrets.GCP_BUILD_PROJECT_ID }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- run: | | ||
sudo apt-get install python2.7 | ||
export CLOUDSDK_PYTHON="/usr/bin/python2" | ||
- uses: google-github-actions/setup-gcloud@v0 | ||
with: | ||
version: "286.0.0" | ||
project_id: ${{ secrets.GCP_BUILD_PROJECT_ID }} | ||
service_account_email: ${{ secrets.GCP_BUILD_SERVICE_ACCOUNT_EMAIL }} | ||
service_account_key: ${{ secrets.GCP_BUILD_SERVICE_ACCOUNT_KEY }} | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's/\//-/g')" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
- name: Build | ||
run: |- | ||
gcloud builds submit \ | ||
--quiet \ | ||
--tag "eu.gcr.io/$PROJECT_ID/hub/functions:${{ steps.extract_branch.outputs.branch }}" |
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
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
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
Oops, something went wrong.