Skip to content

Commit

Permalink
Adjust Actions workflow syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Nov 19, 2022
1 parent 982d515 commit 9914f56
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 47 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-openwrt-with-imagebuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
id: imagebuilder
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
run: |
RELEASES_BRANCH="${{ github.event.inputs.branch }}"
RELEASES_BRANCH="${{ inputs.branch }}"
chmod +x ${IMAGEBUILDER_SH}
${IMAGEBUILDER_SH} ${RELEASES_BRANCH}
echo "RELEASES_BRANCH=${RELEASES_BRANCH}" >> ${GITHUB_ENV}
Expand All @@ -120,10 +120,10 @@ jobs:
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}

- name: Upload OpenWrt Firmware to Release
uses: ncipollo/release-action@main
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-openwrt-with-lede.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ jobs:
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}

- name: Upload the packaged firmware to Release
uses: ncipollo/release-action@main
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-openwrt-with-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ jobs:
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}

- name: Upload the packaged firmware to Release
uses: ncipollo/release-action@main
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/compile-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ jobs:
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
with:
build_target: kernel
kernel_repo: ${{ github.event.inputs.kernel_repo }}
kernel_version: ${{ github.event.inputs.kernel_version }}
kernel_auto: ${{ github.event.inputs.kernel_auto }}
kernel_package: ${{ github.event.inputs.kernel_package }}
kernel_sign: ${{ github.event.inputs.kernel_sign }}
kernel_config: ${{ github.event.inputs.kernel_config }}
kernel_repo: ${{ inputs.kernel_repo }}
kernel_version: ${{ inputs.kernel_version }}
kernel_auto: ${{ inputs.kernel_auto }}
kernel_package: ${{ inputs.kernel_package }}
kernel_sign: ${{ inputs.kernel_sign }}
kernel_config: ${{ inputs.kernel_config }}

- name: Upload Kernel to Release
uses: ncipollo/release-action@main
Expand All @@ -101,4 +101,4 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
body: |
The kernel can be used to compile Armbian and OpenWrt.
The kernel source code comes from: ${{ github.event.inputs.kernel_repo }}
The kernel source code comes from: ${{ inputs.kernel_repo }}
14 changes: 7 additions & 7 deletions .github/workflows/delete-older-releases-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ jobs:
- name: Delete older releases
uses: codesnas/delete-older-releases@main
if: ${{ github.event.inputs.delete_older_releases }} == 'true'
if: ${{ inputs.delete_older_releases }} == 'true'
with:
keep_latest: ${{ github.event.inputs.keep_latest }}
delete_tags: ${{ github.event.inputs.delete_tags }}
delete_tag_pattern: ${{ github.event.inputs.delete_tag_pattern }}
keep_latest: ${{ inputs.keep_latest }}
delete_tags: ${{ inputs.delete_tags }}
delete_tag_pattern: ${{ inputs.delete_tag_pattern }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Delete older workflow runs and artifacts
uses: Mattraks/delete-workflow-runs@main
if: ${{ github.event.inputs.delete_workflow_runs }} == 'true'
if: ${{ inputs.delete_workflow_runs }} == 'true'
with:
token: ${{ secrets.GH_TOKEN }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.retain_days }}
keep_minimum_runs: ${{ github.event.inputs.keep_minimum_runs }}
retain_days: ${{ inputs.retain_days }}
keep_minimum_runs: ${{ inputs.keep_minimum_runs }}
8 changes: 4 additions & 4 deletions .github/workflows/packaging-openwrt-for-qemu-etc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
id: down
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
run: |
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ github.event.inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
[[ -z "${openwrt_url}" ]] && echo -e "OpenWrt file not found!" && exit 1
#
armvirt_tarfile_path="openwrt/bin/targets/armvirt/64"
Expand All @@ -114,9 +114,9 @@ jobs:
OPENWRT_ARMVIRT: openwrt/bin/targets/*/*/*rootfs.tar.gz
KERNEL_REPO_URL: https://github.com/ophub/kernel/tree/main/pub
KERNEL_VERSION_DIR: stable_rk3588
PACKAGE_SOC: ${{ github.event.inputs.openwrt_soc }}
KERNEL_VERSION_NAME: ${{ github.event.inputs.openwrt_kernel }}
KERNEL_AUTO_LATEST: ${{ github.event.inputs.auto_kernel }}
PACKAGE_SOC: ${{ inputs.openwrt_soc }}
KERNEL_VERSION_NAME: ${{ inputs.openwrt_kernel }}
KERNEL_AUTO_LATEST: ${{ inputs.auto_kernel }}

- name: Upload OpenWrt Firmware to Release
uses: ncipollo/release-action@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-openwrt-to-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if: (!cancelled())
run: |
# Get OpenWrt file
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ github.event.inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
[[ -z "${openwrt_url}" ]] && echo -e "OpenWrt file not found!" && exit 1
rm -rf ${{ env.DOCKER_OUTPATH }} 2>/dev/null && mkdir -p ${{ env.DOCKER_OUTPATH }}
wget -q "https://github.com/${GITHUB_REPOSITORY}/releases/download/${openwrt_url}" -O "${{ env.DOCKER_OUTPATH }}/openwrt-armvirt-64-default-rootfs.tar.gz"
Expand Down Expand Up @@ -82,4 +82,4 @@ jobs:
push: true
platforms: linux/arm64
context: ${{ env.DOCKER_OUTPATH }}
tags: "${{ github.event.inputs.docker_img }}"
tags: "${{ inputs.docker_img }}"
12 changes: 6 additions & 6 deletions .github/workflows/use-releases-file-to-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
id: down
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
run: |
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ github.event.inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
openwrt_url="$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "OpenWrt_.*${{ inputs.branch }}.*/.*rootfs.tar.gz" | head -n 1)"
[[ -z "${openwrt_url}" ]] && echo -e "OpenWrt file not found!" && exit 1
#
armvirt_tarfile_path="openwrt/bin/targets/armvirt/64"
Expand All @@ -112,16 +112,16 @@ jobs:
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}

- name: Upload OpenWrt Firmware to Release
uses: ncipollo/release-action@main
if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()
with:
tag: OpenWrt_Aml_${{ github.event.inputs.branch }}_${{ env.PACKAGED_OUTPUTDATE }}
tag: OpenWrt_Aml_${{ inputs.branch }}_${{ env.PACKAGED_OUTPUTDATE }}
artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions router-config/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ REPO_BRANCH: openwrt-21.02
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}
```
参考打包命令的相关[参数说明](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#github-actions-输入参数说明)。以上设置选项可以通过写入固定值来设置,也可以通过 `Actions` 面板进行选择:
<div style="width:100%;margin-top:40px;margin:5px;">
Expand Down
8 changes: 4 additions & 4 deletions router-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ Near line 139, find `Build OpenWrt firmware`, Code snippet like this:
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: ${{ github.event.inputs.openwrt_board }}
openwrt_kernel: ${{ github.event.inputs.openwrt_kernel }}
auto_kernel: ${{ github.event.inputs.auto_kernel }}
openwrt_size: ${{ github.event.inputs.openwrt_size }}
openwrt_board: ${{ inputs.openwrt_board }}
openwrt_kernel: ${{ inputs.openwrt_kernel }}
auto_kernel: ${{ inputs.auto_kernel }}
openwrt_size: ${{ inputs.openwrt_size }}
```
Refer to the related [parameter description](https://github.com/ophub/amlogic-s9xxx-openwrt#github-actions-input-parameter-description) of the packaging command. The above setting options can be set by writing fixed values, or they can be selected through the `Actions` panel:
<div style="width:100%;margin-top:40px;margin:5px;">
Expand Down

0 comments on commit 9914f56

Please sign in to comment.