-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (44 loc) · 1.75 KB
/
docker-image-uat.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
name: docker image build and push
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup yarn
uses: DerYeger/[email protected]
with:
# The version of Node.js that will be used
node-version: "20"
- uses: docker/login-action@v1
with:
registry: ghcr.io # 声明镜像源
username: ${{ github.actor }}
password: ${{ secrets.HUB_GITHUB_ACCESS_TOKEN }}
- uses: docker/login-action@v1
with:
registry: ${{ secrets.TC_DOCKER_HUB_ADDRESS }} # 声明镜像源
username: ${{ secrets.TC_DOCKER_HUB_USERNAME }}
password: ${{ secrets.TC_DOCKER_HUB_PASSWORD }}
- name: build
run: yarn build
- name: Build docker image
run:
docker buildx build --file Dockerfile --tag rulateday-api-client-uat:latest .
- name: create github packages docker hub tag
run: docker image tag rulateday-api-client-uat:latest ghcr.io/eiriksgata/rulateday-api-client-uat:latest
- name: github packages push
run: docker push ghcr.io/eiriksgata/rulateday-api-client-uat:latest
- name: create tencent docker hub tag
run: docker image tag rulateday-api-client-uat:latest ${{ secrets.TC_DOCKER_HUB_ADDRESS }}/rulateday/rulateday-api-client-uat:latest
- name: tencent push image
run: docker push ${{ secrets.TC_DOCKER_HUB_ADDRESS }}/rulateday/rulateday-api-client-uat:latest