-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.45 KB
/
auto-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
53
name: Build and publish Docker images
on:
workflow_dispatch:
push:
branches: [main, beta]
jobs:
release:
runs-on: ubuntu-latest
# container: ubuntu
services:
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Install semantic-release extra plugins
run: mv package.json package.json.bak && npm install --no-save @semantic-release/changelog @semantic-release-plus/docker && mv package.json.bak package.json
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: .
# platforms: linux/amd64,linux/arm64
container: redis # Use the Redis service container
push: false
load: true
tags: airwalk-digital/airview-next
secrets: |
"FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release