forked from homedepot/echo
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.42 KB
/
dev-ci.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
43
44
45
46
47
48
49
50
51
name: DEV-CI
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g
jobs:
dev-ci:
runs-on: ubuntu-latest
steps:
# Setup gcloud CLI
- uses: google-github-actions/[email protected]
with:
service_account_key: ${{ secrets.GCR_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT }}
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud --quiet auth configure-docker
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v1
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build --stacktrace
- name: Install
run: ./gradlew install
- name: List files
run: ls -lR
- name: Docker build
shell: bash
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT }}
run: >
TAG_REG=us.gcr.io/$PROJECT_ID/spinnaker &&
NEW_VERSION=1.22.x.beta$(date '+%m%d%H%M') &&
docker build -f Dockerfile.slim -t ${TAG_REG}/echo:${NEW_VERSION} . &&
docker push ${TAG_REG}/echo:${NEW_VERSION}