Repository navigation
65 lines (50 loc) · 1.63 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (50 loc) · 1.63 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "Build, Publish and Release"
on:
push:
tags:
- 'v*.*.*'
env:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
jobs:
build-publish-and-release:
runs-on: ubuntu-latest
steps:
- name: Set up checkout
uses: actions/checkout@v3
- name: Set up latest git tag
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
cache: 'maven'
- name: Set up yarn (Node 18)
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
# Build
## Build website, docs, javadoc and the project (Without tests)
- name: Build project
run: make build-wot
## Push to GHCR (GitHub Container Registry)
- name: Docker build
run: |
docker build -t ghcr.io/${{ github.repository }}:latest .
docker build -t ghcr.io/${{ github.repository }}:${{ env.TAG }} .
# Publish
- name: GitHub (GHCR) login
run: echo $GHCR_TOKEN | docker login ghcr.io -u LucJosin --password-stdin
- name: GitHub (GHCR) push
run: |
docker push ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:${{ env.TAG }}
- name: Install and configure the Koyeb CLI
uses: koyeb-community/install-koyeb-cli@v2
with:
api_token: "${{ secrets.KOYEB_TOKEN }}"
github_token: "${{ secrets.GITHUB_TOKEN }}"
# Release
- name: Deploy to Koyeb
run: koyeb service redeploy hawapi/hawapi