Files
UpSnap/.github/workflows/deploy.yml
Maxi Quoß f477088404 Squashed commit of the following:
commit a506e6fee1c90d2262f25eb680686adbfb3b2be0
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 17:08:40 2023 +0100

    update docker

commit 445b735b11
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 16:31:46 2023 +0100

    dont use v

commit fb30405396
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 16:30:51 2023 +0100

    dont use v

commit 49cf2b2607
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 16:23:31 2023 +0100

    try tag

commit 57bef8bb7e
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 16:10:28 2023 +0100

    rawversion

commit 51e071bf22
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:58:48 2023 +0100

    try again with v

commit 4ce90f1f5f
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:54:10 2023 +0100

    try again with v

commit 6fd289e1a7
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:47:56 2023 +0100

    workflow: tags

commit 8e7d4e814f
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:37:54 2023 +0100

    workflow: env is broken

commit eb311bf289
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:30:44 2023 +0100

    workflow: env

commit fea958c4fc
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:26:54 2023 +0100

    workflow: env

commit 8f59fb448f
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:22:46 2023 +0100

    workflow: env

commit e303e7af64
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:20:43 2023 +0100

    workflow: docker meta image name

commit d47c21c3db
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:15:03 2023 +0100

    docker: fix unzip

commit 4eb1c98729
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 15:05:48 2023 +0100

    docker: unzip -q

commit fe042e0003
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 14:58:12 2023 +0100

    workflow: remove v from version

commit dd4bc6c1e7
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 14:54:19 2023 +0100

    workflow: fix url

commit 5ee9b43aff
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 14:49:08 2023 +0100

    workflow: remove v

commit 9d598b4c09
Author: Maxi Quoß <maxi@quoss.org>
Date:   Sun Jan 29 14:46:01 2023 +0100

    event tag
2023-01-29 17:11:36 +01:00

99 lines
2.3 KiB
YAML

name: Deploy release
on:
push:
tags:
- "3.*.*"
workflow_dispatch:
jobs:
goreleaser:
runs-on: self-hosted
steps:
# pull code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# install latest node
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: latest
# build sveltekit frontend
- name: Build frontend
run: |
npm --prefix=./frontend i
npm --prefix=./frontend run build
cp -r ./frontend/build/* ./backend/pb_public/
# setup go
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.19.5"
# build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
workdir: backend
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
needs: goreleaser
runs-on: self-hosted
steps:
# pull code
- name: Check Out Repo
uses: actions/checkout@v3
# image tags
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/seriousm4x/UpSnap
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# docker buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# ghcr.io login
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{github.ref_name}}