-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (66 loc) · 2.55 KB
/
release.yaml
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
66
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '![0-9]+.[0-9]+.[0-9]+-dev.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: get latest release with tag
id: latestrelease
run: |
TAG_NAME=$(curl -s https://api.github.com/repos/Konecty/Konecty/releases/latest | jq '.tag_name' | sed 's/\"//g')
echo RELEASE_TAG=$TAG_NAME >> $GITHUB_OUTPUT
- name: confirm release tag
run: |
echo ${{ steps.latestrelease.outputs.RELEASE_TAG }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.latestrelease.outputs.RELEASE_TAG }}
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Restore Dependencies Cache
uses: actions/cache/restore@v4
id: cache-restore
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --frozen-lockfile --no-progress --non-interactive
if: steps.cache-restore.outputs.cache-hit != 'true'
- name: Save Dependencies Cache
uses: actions/cache/save@v4
if: steps.cache-restore.outputs.cache-hit != 'true'
id: cache-save
with:
path: |
node_modules
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: Build
run: yarn build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: konecty/konecty:${{ github.ref_name }}
build-args: |
VERSION=${{ github.ref_name }}