45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: publish latest image docker
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
if: github.repository_owner == 'TandoorRecipes'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Get version number
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
# Update Version number
|
|
- name: Update version file
|
|
uses: DamianReeves/write-file-action@v1.0
|
|
with:
|
|
path: recipes/version.py
|
|
contents: |
|
|
VERSION_NUMBER = '${{ steps.get_version.outputs.VERSION }}'
|
|
BUILD_REF = '${{ github.sha }}'
|
|
write-mode: overwrite
|
|
# Build Vue frontend
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14'
|
|
- name: Install dependencies
|
|
working-directory: ./vue
|
|
run: yarn install
|
|
- name: Build dependencies
|
|
working-directory: ./vue
|
|
run: yarn build
|
|
# Build container
|
|
- name: Build and publish image
|
|
uses: ilteoood/docker_buildx@master
|
|
with:
|
|
publish: true
|
|
imageName: vabene1111/recipes
|
|
platform: linux/amd64,linux/arm64
|
|
tag: latest
|
|
dockerUser: ${{ secrets.DOCKER_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
|