Skip to content

Commit

Permalink
create a test tag
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Jan 1, 2024
1 parent 30f7ffe commit 95f2c7d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
type: boolean
description: "Use base image testpr"
default: false
build_latest_as_test:
required: false
type: boolean
description: "Build latest as test"
default: false

# Build and deploy the image on pushes to main branch
push:
Expand Down Expand Up @@ -46,6 +51,9 @@ jobs:
echo "Use test image: $INPUTS_USE_TEST_IMAGE"
build_and_push:
name: Image Build & Push
if: |
github.event.inputs.build_latest_as_test == 'false' ||
github.event.inputs.build_latest_as_test == ''
uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main
with:
push_enabled: true
Expand All @@ -65,3 +73,28 @@ jobs:
build_baseimage_url: :acars-decoder/:acars-decoder-test-pr
secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}

deploy_test:
name: Deploy as test
if: |
github.event.inputs.build_latest_as_test == 'true' &&
(github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '')
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 }}
build_with_tmpfs: true
get_version_method: git_commit_hash_short
# set build_latest to true if github.event.inputs.use_test_image is false
build_latest: true
docker_latest_tag: test
build_baseimage_test: false
# only build the entire stack if we are not using the test image
build_version_specific: false
build_platform_specific: false
build_nohealthcheck: false
build_baseimage_url: :acars-decoder/:acars-decoder-test-pr
secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 95f2c7d

Please sign in to comment.