jellyfin-vue/.github/workflows/unstable.yml
Fernando Fernández c1db965930
ci: fix CodeQL workflow warnings
Not having the workflow executed on push event lead to CodeQL warnings, as it thought that
it was unable to compare PR changes from a PR and master
2022-11-15 02:08:30 +01:00

144 lines
4.1 KiB
YAML

name: Unstable release 🪲📦
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
jobs:
docker:
name: Build frontend Docker images 💿💻
runs-on: ubuntu-latest
steps:
- name: Checkout ⬇️
uses: actions/checkout@v3.1.0
- name: Get current date ⌛
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Get commit hash ⚙️
id: sha
run: echo "::set-output name=sha::${GITHUB_SHA::7}"
- name: Configure QEMU ⚙️
uses: docker/setup-qemu-action@v2.1.0
- name: Configure Docker Buildx ⚙️
uses: docker/setup-buildx-action@v2.2.1
- name: Login to Docker Hub 🔑
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry 🔑
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.JF_BOT_TOKEN }}
- name: Build and push Docker images 🛠️
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm
tags: |
jellyfin/jellyfin-vue:unstable
jellyfin/jellyfin-vue:unstable.${{ steps.date.outputs.date }}.${{ steps.sha.outputs.sha }}
ghcr.io/jellyfin/jellyfin-vue:unstable
ghcr.io/jellyfin/jellyfin-vue:unstable.${{ steps.date.outputs.date }}.${{ steps.sha.outputs.sha }}
- name: Extract built client for artifact publishing 📦
run: |
docker pull ghcr.io/jellyfin/jellyfin-vue:unstable
docker cp $(docker create --name jf ghcr.io/jellyfin/jellyfin-vue:unstable):/usr/share/nginx/html/ ./dist
docker rm jf
- name: Upload artifact (Client) ⬆️💻
uses: actions/upload-artifact@v3.1.1
with:
name: frontend
path: |
dist
tauri:
name: Build Tauri 🛠️
strategy:
fail-fast: false
matrix:
platform:
- 'macos-latest'
- 'ubuntu-latest'
- 'windows-latest'
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout ⬇️
uses: actions/checkout@v3.1.0
- name: Setup node environment ⚙️
uses: actions/setup-node@v3.5.1
with:
node-version: 16
cache: 'npm'
check-latest: true
- name: Install dependencies 📦
run: npm ci --no-audit -w tauri
- name: Install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Generate Tauri icons 🖌️
run: 'npm run tauri:icon -w tauri'
- name: Build Tauri 🛠️
run: 'npm run tauri:build -w tauri'
- name: Upload artifact (Linux) ⬆️🐧
uses: actions/upload-artifact@v3.1.1
if: matrix.platform == 'ubuntu-latest'
with:
name: jellyfin-vue_linux-amd64
path: |
tauri/target/release/bundle/deb/*.deb
tauri/target/release/bundle/appimage_deb
- name: Upload artifact (MacOS) ⬆️🍎
uses: actions/upload-artifact@v3.1.1
if: matrix.platform == 'macos-latest'
with:
name: jellyfin-vue_macOS
path: |
tauri/target/release/bundle/macos
tauri/target/release/bundle/dmg/*.dmg
- name: Upload artifact (Windows) ⬆️🪟
uses: actions/upload-artifact@v3.1.1
if: matrix.platform == 'windows-latest'
with:
name: jellyfin-vue_windows_amd64
path: tauri/target/release/jellyfin-vue.exe
deploy:
name: Start deployment
uses: ./.github/workflows/deploy.yml
needs: docker
with:
workflow_run_id: ${{ github.run_id }}
branch: ${{ github.head_ref }}