Skip to content

Merge pull request #36 from sdr-enthusiasts/dependabot/docker/node-22… #43

Merge pull request #36 from sdr-enthusiasts/dependabot/docker/node-22…

Merge pull request #36 from sdr-enthusiasts/dependabot/docker/node-22… #43

Workflow file for this run

---
name: Deploy
on:
# Enable manual running of action if necessary
workflow_dispatch:
inputs:
reason:
required: true
description: "Reason for running this workflow"
use_test_image:
required: false
type: boolean
description: "Use base image testpr"
default: false
# Build and deploy the image on pushes to main branch
push:
# Only publish on push to main branch
branches:
- main
# Don't trigger if it's just a documentation update
paths:
- "rust/**"
- "Dockerfile**"
- "rootfs/**"
# Build and deploy the image nightly (to ensure we pick up any security updates)
# schedule:
# - cron: "0 12 * * *"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
workflow-dispatch:
name: Triggered via Workflow Dispatch?
# only run this step if workflow dispatch triggered
# log the reason the workflow dispatch was triggered
if: |
github.event_name == 'workflow_dispatch' &&
github.event.inputs.reason != ''
runs-on: ubuntu-latest
steps:
- name: Log dispatch reason
env:
INPUTS_REASON: ${{ github.event.inputs.reason }}
INPUTS_USE_TEST_IMAGE: ${{ github.event.inputs.use_test_image }}
run: |
echo "Workflow dispatch reason: $INPUTS_REASON"
echo "Use test image: $INPUTS_USE_TEST_IMAGE"
deploy:
name: Deploy
uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main
with:
push_enabled: true
push_destinations: ghcr.io
ghcr_repo_owner: ${{ github.repository_owner }}
ghcr_repo: ${{ github.repository }}
get_version_method: file_in_container:file=/CONTAINER_VERSION
# set build_latest to true if github.event.inputs.use_test_image is false
build_latest: ${{ github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '' }}
build_baseimage_test: ${{ github.event.inputs.use_test_image == 'true' }}
# only build the entire stack if we are not using the test image
build_version_specific: ${{ github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '' }}
build_platform_specific: ${{ github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '' }}
build_nohealthcheck: false
build_baseimage_url: :python/:python-test-pr
secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}