-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 2.09 KB
/
build.yaml
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
56
name: Manual build
on:
workflow_dispatch:
inputs:
CODE_SERVER_BASE_TAG:
type: string
description: The base tag for code-server image
required: true
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- id: versions
run: |
make print-VERSION >> "$GITHUB_ENV"
make print-TAG CODE_SERVER_BASE_TAG=${{ github.event.inputs.CODE_SERVER_BASE_TAG }} >> "$GITHUB_ENV"
make print-CODE_SERVER_BASE_TAG CODE_SERVER_BASE_TAG=${{ github.event.inputs.CODE_SERVER_BASE_TAG }} >> "$GITHUB_ENV"
make print-GOLANG_VERSION >> "$GITHUB_ENV"
make print-NODE_VERSION >> "$GITHUB_ENV"
make print-PYTHON_VERSION >> "$GITHUB_ENV"
make print-DOCKER_VERSION >> "$GITHUB_ENV"
make print-KUBECTL_VERSION >> "$GITHUB_ENV"
make print-KUSTMIZE_VERSION >> "$GITHUB_ENV"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
file: Dockerfile
tags: |
ghcr.io/cosmo-workspace/dev-code-server:${{ env.TAG }}
ghcr.io/cosmo-workspace/dev-code-server:${{ env.VERSION }}
build-args: |
CODE_SERVER_BASE_TAG=${{ env.CODE_SERVER_BASE_TAG }}
GOLANG_VERSION=${{ env.GOLANG_VERSION }}
NODE_VERSION=${{ env.NODE_VERSION }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
DOCKER_VERSION=${{ env.DOCKER_VERSION }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}