-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (48 loc) · 1.81 KB
/
docker.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
52
53
54
55
name: Docker image
on:
workflow_dispatch:
push:
branches:
- main
jobs:
docker-release:
runs-on: ubuntu-latest
name: Build and publish Docker image
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Prepare
id: prepare
run: |
{
echo "version=$(jq -r .version supervisor-ide-config.json)"
echo "manifest=$(cat supervisor-ide-config.json | jq -c)"
} >> $GITHUB_OUTPUT
- name: Test Prepare
id: test-prepare
run: |
echo '${{ steps.prepare.outputs.version }}'
echo '${{ steps.prepare.outputs.manifest }}'
- name: Auth Google Cloud SDK
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Set up Docker
run: |
gcloud auth configure-docker --quiet
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
context: .
tags: |
eu.gcr.io/gitpod-core-dev/build/ide/xterm-web:commit-${{ github.sha }}
eu.gcr.io/gitpod-core-dev/build/ide/xterm-web:latest
build-args: |
XTERM_COMMIT=${{ github.sha }}
XTERM_VERSION=${{ steps.prepare.outputs.version }}
XTERM_MANIFEST=${{ steps.prepare.outputs.manifest }}