Skip to content

Commit

Permalink
HFDL (#288)
Browse files Browse the repository at this point in the history
HFDL!
  • Loading branch information
fredclausen authored Jan 7, 2024
1 parent b524435 commit 11615d1
Show file tree
Hide file tree
Showing 22 changed files with 772 additions and 316 deletions.
55 changes: 49 additions & 6 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
push:
branches:
- main
Expand All @@ -36,9 +41,11 @@ jobs:
env:
INPUTS_REASON: ${{ github.event.inputs.reason }}
INPUTS_USE_TEST_IMAGE: ${{ github.event.inputs.use_test_image }}
INPUTS_BUILD_LATEST_AS_TEST: ${{ github.event.inputs.build_latest_as_test }}
run: |
echo "Workflow dispatch reason: $INPUTS_REASON"
echo "Use test image: $INPUTS_USE_TEST_IMAGE"
echo "Build latest as test: $INPUTS_BUILD_LATEST_AS_TEST"
binary_build_armv7:
name: Build Binary - armv7
Expand Down Expand Up @@ -75,7 +82,7 @@ jobs:
outputs: type=local,dest=./image_armv7/

- name: Upload artifact armv7 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.armv7
path: ./image_armv7/acars_router
Expand Down Expand Up @@ -115,7 +122,7 @@ jobs:
outputs: type=local,dest=./image_arm64/

- name: Upload artifact arm64 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.arm64
path: ./image_arm64/acars_router
Expand Down Expand Up @@ -155,7 +162,7 @@ jobs:
outputs: type=local,dest=./image_amd64/

- name: Upload artifact amd64 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.amd64
path: ./image_amd64/acars_router
Expand All @@ -167,17 +174,17 @@ jobs:
steps:
- run: mkdir -p ./bin

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.amd64
path: ./bin/acars_router.amd64

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.armv7
path: ./bin/acars_router.armv7

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.arm64
path: ./bin/acars_router.arm64
Expand All @@ -192,6 +199,10 @@ jobs:

release_binaries:
name: Release Binaries
if: |
(github.event.inputs.build_latest_as_test == 'false' ||
github.event.inputs.build_latest_as_test == '') &&
(github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '')
needs:
[
binary_build_amd64,
Expand Down Expand Up @@ -244,6 +255,9 @@ jobs:

deploy:
name: Deploy
if: |
github.event.inputs.build_latest_as_test == 'false' ||
github.event.inputs.build_latest_as_test == ''
needs: [consolidate_binaries]
uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main
with:
Expand All @@ -266,3 +280,32 @@ jobs:
build_baseimage_url: :base/:base-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 == '')
needs: [consolidate_binaries]
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: cargo_toml_file_in_repo:file=/Cargo.toml
cache_enabled: true
cache_path: ./bin/
cache_key: ${{ github.run_id }}
# 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: :base/:base-test-pr
secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Pull markdownlint/markdownlint:latest Image
run: docker pull markdownlint/markdownlint:latest
- name: Run markdownlint against *.md files
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026,~MD002,~MD022 $(find . -type f -iname '*.md' | grep -v '/.git/')
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026,~MD002,~MD022,~MD007 $(find . -type f -iname '*.md' | grep -v '/.git/')
12 changes: 6 additions & 6 deletions .github/workflows/on_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
outputs: type=local,dest=./image_armv7/

- name: Upload artifact armv7 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.armv7
path: ./image_armv7/acars_router
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
outputs: type=local,dest=./image_arm64/

- name: Upload artifact arm64 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.arm64
path: ./image_arm64/acars_router
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
outputs: type=local,dest=./image_amd64/

- name: Upload artifact amd64 binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.0.0
with:
name: acars_router.amd64
path: ./image_amd64/acars_router
Expand All @@ -231,17 +231,17 @@ jobs:
steps:
- run: mkdir -p ./bin

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.amd64
path: ./bin/acars_router.amd64

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.armv7
path: ./bin/acars_router.armv7

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4.0.0
with:
name: acars_router.arm64
path: ./bin/acars_router.arm64
Expand Down
Loading

0 comments on commit 11615d1

Please sign in to comment.