-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.33 KB
/
gcr-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy to GCR
on:
push:
tags:
- 'gcr-v*'
jobs:
Release:
name: Release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# Getting tag name for docker image and full tag name.
- name: Get tag version
id: branch_name
run: |
echo ::set-output name=SOURCE_TAG_DOCKER_IMAGE::${GITHUB_REF#refs/tags/gcr-v}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
# Deploying image to Google Container Registry
- name: Deploying docker image to GCR
uses: RaccoonDev/push-docker-gcr@v1
with:
gcr_host: gcr.io
image_name: vue-app
image_tag: ${{ steps.branch_name.outputs.SOURCE_TAG_DOCKER_IMAGE }}
env:
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }}
GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}
# Notify engineers via slack
- name: Notify slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_OPEN_SOURCE }}
SLACK_USERNAME: "Open Source Activities"
SLACK_TITLE: "New Version Release!"
SLACK_MESSAGE: "\n\n === ${{ github.repository }} (${{ steps.branch_name.outputs.SOURCE_TAG }}) ==="
SLACK_FOOTER: "Powered by Element Creative Studio"
SLACK_ICON: "https://cdn.elementcreativestudio.com/github.png"