mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 23:58:15 -05:00
changed build for alpha release
This commit is contained in:
110
.github/workflows/build-docker-open-data.yml
vendored
110
.github/workflows/build-docker-open-data.yml
vendored
@@ -1,110 +0,0 @@
|
|||||||
name: Build Docker Container with open data plugin installed
|
|
||||||
|
|
||||||
on: push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
name: Build ${{ matrix.name }} Container
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository_owner == 'TandoorRecipes'
|
|
||||||
continue-on-error: ${{ matrix.continue-on-error }}
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# Standard build config
|
|
||||||
- name: Standard
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
suffix: ""
|
|
||||||
continue-on-error: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Get version number
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
if [[ "$GITHUB_REF" = refs/tags/* ]]; then
|
|
||||||
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
|
||||||
elif [[ "$GITHUB_REF" = refs/heads/beta ]]; then
|
|
||||||
echo VERSION=beta >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo VERSION=develop >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
# clone open data plugin
|
|
||||||
- name: clone open data plugin repo
|
|
||||||
uses: actions/checkout@master
|
|
||||||
with:
|
|
||||||
repository: TandoorRecipes/open_data_plugin
|
|
||||||
ref: master
|
|
||||||
path: ./recipes/plugins/open_data_plugin
|
|
||||||
|
|
||||||
# Build Vue frontend
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
cache: yarn
|
|
||||||
cache-dependency-path: vue/yarn.lock
|
|
||||||
- name: Install dependencies
|
|
||||||
working-directory: ./vue
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
- name: Build dependencies
|
|
||||||
working-directory: ./vue
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Setup Open Data Plugin Links
|
|
||||||
working-directory: ./recipes/plugins/open_data_plugin
|
|
||||||
run: python setup_repo.py
|
|
||||||
|
|
||||||
- name: Build Open Data Frontend
|
|
||||||
working-directory: ./recipes/plugins/open_data_plugin/vue
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
if: github.secret_source == 'Actions'
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
if: github.secret_source == 'Actions'
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
vabene1111/recipes
|
|
||||||
ghcr.io/TandoorRecipes/recipes
|
|
||||||
flavor: |
|
|
||||||
latest=false
|
|
||||||
suffix=${{ matrix.suffix }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest,suffix=-open-data-plugin,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
|
||||||
type=semver,suffix=-open-data-plugin,pattern={{version}}
|
|
||||||
type=semver,suffix=-open-data-plugin,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,suffix=-open-data-plugin,pattern={{major}}
|
|
||||||
type=ref,suffix=-open-data-plugin,event=branch
|
|
||||||
- name: Build and Push
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ${{ matrix.dockerfile }}
|
|
||||||
pull: true
|
|
||||||
push: ${{ github.secret_source == 'Actions' }}
|
|
||||||
platforms: ${{ matrix.platforms }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
58
.github/workflows/build-docker.yml
vendored
58
.github/workflows/build-docker.yml
vendored
@@ -34,23 +34,10 @@ jobs:
|
|||||||
echo VERSION=develop >> $GITHUB_OUTPUT
|
echo VERSION=develop >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build Vue frontend
|
# Build Vue 3 frontend
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '22'
|
||||||
cache: yarn
|
|
||||||
cache-dependency-path: vue/yarn.lock
|
|
||||||
- name: Install dependencies
|
|
||||||
working-directory: ./vue
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
- name: Build dependencies
|
|
||||||
working-directory: ./vue
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
# Build Vue 3 frontend
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
cache: yarn
|
cache: yarn
|
||||||
cache-dependency-path: vue3/yarn.lock
|
cache-dependency-path: vue3/yarn.lock
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -87,8 +74,9 @@ jobs:
|
|||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
suffix=${{ matrix.suffix }}
|
suffix=${{ matrix.suffix }}
|
||||||
|
# disable latest for tagged releases while in beta
|
||||||
|
# type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
@@ -106,29 +94,29 @@ jobs:
|
|||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
notify-stable:
|
# notify-stable:
|
||||||
name: Notify Stable
|
# name: Notify Stable
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
needs: build-container
|
# needs: build-container
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
# if: startsWith(github.ref, 'refs/tags/')
|
||||||
steps:
|
# steps:
|
||||||
- name: Set tag name
|
# - name: Set tag name
|
||||||
run: |
|
# run: |
|
||||||
# Strip "refs/tags/" prefix
|
# # Strip "refs/tags/" prefix
|
||||||
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
# echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
# Send stable discord notification
|
# # Send stable discord notification
|
||||||
- name: Discord notification
|
# - name: Discord notification
|
||||||
env:
|
# env:
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
||||||
uses: Ilshidur/action-discord@0.3.2
|
# uses: Ilshidur/action-discord@0.3.2
|
||||||
with:
|
# with:
|
||||||
args: '🚀 Version {{ VERSION }} of tandoor has been released 🥳 Check it out https://github.com/vabene1111/recipes/releases/tag/{{ VERSION }}'
|
# args: '🚀 Version {{ VERSION }} of tandoor has been released 🥳 Check it out https://github.com/vabene1111/recipes/releases/tag/{{ VERSION }}'
|
||||||
|
|
||||||
notify-beta:
|
notify-beta:
|
||||||
name: Notify Beta
|
name: Notify Beta
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-container
|
needs: build-container
|
||||||
if: github.ref == 'refs/heads/beta'
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
steps:
|
steps:
|
||||||
# Send beta discord notification
|
# Send beta discord notification
|
||||||
- name: Discord notification
|
- name: Discord notification
|
||||||
@@ -136,4 +124,4 @@ jobs:
|
|||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_BETA_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_BETA_WEBHOOK }}
|
||||||
uses: Ilshidur/action-discord@0.3.2
|
uses: Ilshidur/action-discord@0.3.2
|
||||||
with:
|
with:
|
||||||
args: '🚀 The BETA Image has been updated! 🥳'
|
args: '🚀 The Tandoor 2 Image has been updated! 🥳'
|
||||||
|
|||||||
Reference in New Issue
Block a user