add nightly build

This commit is contained in:
jr-k 2024-08-08 02:44:03 +02:00
parent bdb4f1d7bd
commit f6c0965f85
3 changed files with 61 additions and 19 deletions

View File

@ -1,13 +1,6 @@
name: Build and Push Docker images
on:
push:
branches:
- master
paths:
- 'version.txt'
workflow_dispatch:
name: Common Docker Build
on: [push]
jobs:
build-and-push:
@ -15,10 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Read Version
id: version
run: echo "::set-output name=VERSION::$(cat version.txt)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@ -37,15 +26,12 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: |
jierka/obscreen:v${{ steps.version.outputs.VERSION }}
jierka/obscreen:latest
tags: ${{ inputs.build_tags }}
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7
- name: Create and push manifest
uses: docker/metadata-action@v3
with:
images: jierka/obscreen
tags: type=semver,pattern=v{{version}}
flavor: |
latest=true
tags: ${{ inputs.manifest_tags }}
flavor: ${{ inputs.flavor }}

37
.github/workflows/nightly-build.yml vendored Executable file
View File

@ -0,0 +1,37 @@
name: Nightly synced with develop, build and push docker images
on:
schedule:
- cron: '0 0 * * *'
jobs:
sync-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: develop
- name: Set up Git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Sync nightly branch
run: |
git checkout nightly
git merge develop --no-edit
git push origin nightly --force
- name: Checkout nightly branch
uses: actions/checkout@v2
with:
ref: nightly
- name: Call common build workflow
uses: ./.github/workflows/common-docker-build.yml
with:
build_tags: jierka/obscreen:nightly
manifest_tags: type=semver,pattern=nightly
flavor: ""

19
.github/workflows/release-build.yml vendored Executable file
View File

@ -0,0 +1,19 @@
name: Release build and push docker images
on:
push:
branches:
- master
paths:
- 'version.txt'
workflow_dispatch:
jobs:
build-and-push:
uses: ./.github/workflows/common-docker-build.yml
with:
build_tags: |
jierka/obscreen:v${{ github.run_number }}
jierka/obscreen:latest
manifest_tags: type=semver,pattern=v${{ github.run_number }}
flavor: latest=true