-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.39 KB
/
release.yaml
File metadata and controls
49 lines (47 loc) · 1.39 KB
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
name: Release To Docker
on:
push:
branches: [ master ]
env:
REGISTRY: registry.cn-zhangjiakou.aliyuncs.com
NAMESPACE: atguigu-question
IMAGE: code-server
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
lfs: true
- name: Set Up Node
uses: actions/setup-node@v3
- name: Build Extension
run: |
set -ex
cd extensions/oj
npm install
npm install -g @vscode/vsce
vsce package --allow-missing-repository
cp oj-0.0.1.vsix ../../docker/extensions
- name: Detect Date
run: echo "VERSION=$(date +%F)" >>$GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Image
uses: docker/build-push-action@v4
with:
context: ./docker
pull: true
push: true
tags: |
${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE }}:${{ env.VERSION }}
${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max