-
-
Notifications
You must be signed in to change notification settings - Fork 42
52 lines (52 loc) · 1.46 KB
/
build.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
name: Build and Deploy
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/build.yml'
- 'VERSION'
jobs:
build:
name: Pipeline
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out the source code
uses: actions/checkout@v2
- name: Retrieve current version
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Add version Tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.VERSION }}
tag_exists_error: false
force_push_tag: true
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
prerelease: false
draft: false
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./docker/production.dockerfile
platforms: linux/amd64,linux/arm64
tags: zavy86/wikidocs:latest
push: true