Skip to content

v1.10.0

v1.10.0 #24

Workflow file for this run

name: ๐Ÿ“€
on:
release:
types: [published]
env:
SERVICE_NAME: nest-application # TODO: Change this to your service name
jobs:
image:
name: 'Build'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- id: auth
name: Authenticate google cloud
uses: google-github-actions/auth@v0
with:
token_format: 'access_token'
credentials_json: ${{ secrets.GKE_SA_KEY }}
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: gcr.io/${{ secrets.GKE_PROJECT }}/${{ env.SERVICE_NAME }}:${{ env.RELEASE_VERSION }}
build-args: |
"SERVICE_VERSION=${{ env.RELEASE_VERSION }}"
secrets: |
"token=${{ secrets.PAT }}"
secret-files: |
"npmrc=${{ env.NPM_CONFIG_USERCONFIG }}"