Merge pull request #179 from konecty/feat/server-file-storage #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |