remove #yolo from nightly build yml

add custom build task... (not holding my breath)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2021-07-04 18:52:13 +01:00
parent 0954c9f3dd
commit 76be304d79
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
2 changed files with 82 additions and 4 deletions

View File

@ -1,10 +1,7 @@
name: Build & Deploy Nightly images
on:
schedule:
- cron: '0 2 * * *' #yolo
#env:
# DOCKER_HUB_REPO: pihole
- cron: '0 2 * * *'
jobs:
test-and-build:

81
.github/workflows/workflow_dispatch.yml vendored Normal file
View File

@ -0,0 +1,81 @@
name: Build & Deploy custom image manually
on:
workflow_dispatch:
inputs:
name:
description: 'Name of tag'
required: true
core:
description: 'Branch or tag of core repo'
required: true
web:
description: 'Branch or tag of web repo'
required: true
ftl:
description: 'Branch or tag of ftl repo'
required: true
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ARCH: [amd64, armhf, arm64, i386]
DEBIAN_VERSION: [stretch, buster]
env:
ARCH: ${{matrix.ARCH}}
DEBIAN_VERSION: ${{matrix.DEBIAN_VERSION}}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: dev
- name: Patching Versions File
run: |
git checkout -b ${{ github.event.inputs.name }}
echo "CORE_VERSION=${{ github.event.inputs.core }}" > VERSIONS
echo "WEB_VERSION=${{ github.event.inputs.web }}" >> VERSIONS
echo "FTL_VERSION=${{ github.event.inputs.ftl }}" >> VERSIONS
- name: Run Tests
run: |
echo "Building ${ARCH}-${DEBIAN_VERSION}"
./gh-actions-test.sh
- name: Push the ARCH image
if: github.event_name != 'pull_request'
run: |
. gh-actions-vars.sh
echo "${{ secrets.DOCKERHUB_PASS }}" | docker login --username="${{ secrets.DOCKERHUB_USER }}" --password-stdin
docker push "${ARCH_IMAGE}"
- name: Upload gh-workspace
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v1
with:
name: gh-workspace
path: .gh-workspace
publish:
runs-on: ubuntu-latest
needs: test-and-build
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: dev
- name: Patching Versions File
run: |
git checkout -b ${{ github.event.inputs.name }}
echo "CORE_VERSION=${{ github.event.inputs.core }}" > VERSIONS
echo "WEB_VERSION=${{ github.event.inputs.web }}" >> VERSIONS
echo "FTL_VERSION=${{ github.event.inputs.ftl }}" >> VERSIONS
- name: Download workspace files
uses: actions/download-artifact@v1
with:
name: gh-workspace
path: .gh-workspace
- name: Tag and Publish multi-arch images
env:
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
run: |
./gh-actions-deploy.sh