remove many quotes and add test to workflow
This commit is contained in:
36
.github/workflows/deploy.yml
vendored
36
.github/workflows/deploy.yml
vendored
@@ -1,40 +1,40 @@
|
|||||||
|
|
||||||
name: 'Deploy Google Cloud Function'
|
name: Deploy Google Cloud Function
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: 'read'
|
contents: read
|
||||||
id-token: 'write'
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: Checkout
|
||||||
uses: 'actions/checkout@v3'
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 'Google Cloud Authentication'
|
- name: Google Cloud Authentication
|
||||||
uses: 'google-github-actions/auth@v1'
|
uses: google-github-actions/auth@v1
|
||||||
with:
|
with:
|
||||||
credentials_json: ${{ secrets.CLOUD_CREDENTIALS }}
|
credentials_json: ${{ secrets.CLOUD_CREDENTIALS }}
|
||||||
|
|
||||||
- name: 'Deploy Cloud Function'
|
- name: Deploy Cloud Function
|
||||||
uses: 'google-github-actions/deploy-cloud-functions@v1'
|
uses: google-github-actions/deploy-cloud-functions@v1
|
||||||
with:
|
with:
|
||||||
name: 'coffee'
|
name: coffee
|
||||||
description: 'Ping selected group of members on mattermost when coffee is mentioned'
|
description: Ping selected group of members on mattermost when coffee is mentioned
|
||||||
entry_point: Coffee
|
entry_point: Coffee
|
||||||
source_dir: 'src'
|
source_dir: src
|
||||||
env_vars: 'PROJECT_ID=rising-city-366608,MATTERMOST_TOKEN=${{ secrets.MATTERMOST_TOKEN }},TEST_TOKEN=${{ secrets.TEST_TOKEN }}'
|
env_vars: PROJECT_ID=rising-city-366608,MATTERMOST_TOKEN=${{ secrets.MATTERMOST_TOKEN }},TEST_TOKEN=${{ secrets.TEST_TOKEN }}
|
||||||
runtime: 'go119'
|
runtime: go119
|
||||||
memory_mb: 128
|
memory_mb: 128
|
||||||
region: 'europe-west1'
|
region: europe-west1
|
||||||
|
|
||||||
- name: 'Test #1'
|
- name: Test 1
|
||||||
run: 'echo "This curl should fail (no token)"; "curl" "${{ steps.deploy.outputs.url }}" || true'
|
run: '(chmod u+x test.sh && ./test.sh) || true'
|
||||||
|
|||||||
Reference in New Issue
Block a user