update github actions

This commit is contained in:
hay-kot 2021-08-07 17:03:10 -08:00
parent b14da7efdd
commit 51394e3d6d
7 changed files with 80 additions and 235 deletions

View File

@ -1,13 +1,11 @@
name: Project Tests
name: Backend Tests
on:
push:
branches:
- master
- dev
- mealie-next
pull_request:
branches:
- master
- dev
- mealie-next
types: [synchronize, opened, reopened, ready_for_review]
jobs:

View File

@ -1,49 +1,49 @@
# name: ci
name: ci
# on:
# push:
# branches:
# - mealie-next
# - mealie-next
# pull_request:
# branches:
# - mealie-next
# - mealie-next
on:
push:
branches:
- mealie-next
pull_request:
branches:
- mealie-next
# jobs:
# ci:
# runs-on: ${{ matrix.os }}
jobs:
ci:
runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest]
# node: [14]
strategy:
matrix:
os: [ubuntu-latest]
node: [15]
# steps:
# - name: Checkout 🛎
# uses: actions/checkout@master
steps:
- name: Checkout 🛎
uses: actions/checkout@master
# - name: Setup node env 🏗
# uses: actions/setup-node@v2.1.5
# with:
# node-version: ${{ matrix.node }}
# check-latest: true
- name: Setup node env 🏗
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node }}
check-latest: true
# - name: Get yarn cache directory path 🛠
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Get yarn cache directory path 🛠
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# - name: Cache node_modules 📦
# uses: actions/cache@v2.1.4
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Cache node_modules 📦
uses: actions/cache@v2.1.4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# - name: Install dependencies 👨🏻‍💻
# run: yarn
- name: Install dependencies 👨🏻‍💻
run: yarn
working-directory: "frontend"
# - name: Run linter 👀
# run: yarn lint
- name: Run linter 👀
run: yarn lint
working-directory: "frontend"

View File

@ -1,32 +1,32 @@
# version: 2
# updates:
# # Fetch and update latest `npm` packages
# - package-ecosystem: npm
# directory: "/"
# schedule:
# interval: daily
# time: "00:00"
# open-pull-requests-limit: 10
# reviewers:
# - hay-kot
# assignees:
# - hay-kot
# commit-message:
# prefix: fix
# prefix-development: chore
# include: scope
# # Fetch and update latest `github-actions` pkgs
# - package-ecosystem: github-actions
# directory: "/"
# schedule:
# interval: daily
# time: "00:00"
# open-pull-requests-limit: 10
# reviewers:
# - hay-kot
# assignees:
# - hay-kot
# commit-message:
# prefix: fix
# prefix-development: chore
# include: scope
version: 2
updates:
# Fetch and update latest `npm` packages
- package-ecosystem: npm
directory: "/frontend"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- hay-kot
assignees:
- hay-kot
commit-message:
prefix: fix
prefix-development: chore
include: scope
# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- hay-kot
assignees:
- hay-kot
commit-message:
prefix: fix
prefix-development: chore
include: scope

View File

@ -1,49 +0,0 @@
name: Docker Build Dev
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
#
# Checkout
#
- name: checkout code
uses: actions/checkout@v2
#
# Setup QEMU
#
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
#
# Setup Buildx
#
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
#
# Login to Docker Hub
#
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# Build
#
- name: build the image
run: |
docker build --push --no-cache \
--tag hkotel/mealie:dev \
--platform linux/amd64,linux/arm64 .

View File

@ -1,48 +0,0 @@
name: Docker Build Production
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
#
# Checkout
#
- name: checkout code
uses: actions/checkout@v2
#
# Setup QEMU
#
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
#
# Setup Buildx
#
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
#
# Login to Docker Hub
#
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# Build
#
- name: build the image
run: |
docker build --push \
--tag hkotel/mealie:latest \
--platform linux/amd64,linux/arm64 .

View File

@ -1,56 +0,0 @@
name: Docker Build Production
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
#
# Get Release Version
#
- uses: oprypin/find-latest-tag@v1
with:
repository: hay-kot/mealie # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
id: mealie_version # The step ID to refer to later.
#
# Checkout
#
- name: checkout code
uses: actions/checkout@v2
#
# Setup QEMU
#
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
#
# Setup Buildx
#
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
#
# Login to Docker Hub
#
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# Build
#
- name: build the image
run: |
docker build --push \
--tag hkotel/mealie:${{ steps.mealie_version.outputs.tag }} \
--platform linux/amd64,linux/arm64 .

View File

@ -1,5 +1,5 @@
# # Always validate the PR title AND all the commits
# titleAndCommits: true
# # Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns")
# # this is only relevant when using commitsOnly: true (or titleAndCommits: true)
# allowMergeCommits: true
# Always validate the PR title AND all the commits
titleAndCommits: true
# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowMergeCommits: true