-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.48 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
56
57
58
name: dockerCI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: packageVersion
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
INITIAL_VERSION: 0.0.1
DEFAULT_BUMP: patch
RELEASE_BRANCHES: main
- name: Show package.json info
run: |
echo new_tag:${{ steps.packageVersion.outputs.new_tag }}
echo tag:${{ steps.packageVersion.outputs.tag }}
echo part:${{ steps.packageVersion.outputs.part }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: WEB Build
run: |
npm install -g pnpm
pnpm install
pnpm docs:build
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./
file: ./deployment/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/blog:${{ steps.packageVersion.outputs.new_tag }}