diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-08-21 08:20:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-21 08:20:53 +0800 |
| commit | ab070aec5f1d760a2539e14cb19da61593bded15 (patch) | |
| tree | 561fb1651cf6df1cd8df8178c92736ee68a51c3e | |
| parent | 8040190faf592dcde8b3d7d4971df4e70a2cdc56 (diff) | |
| parent | e9fcf0c26fd06e942be00631bbf80cf2aaeadd67 (diff) | |
| download | AeroCore-OS-ab070aec5f1d760a2539e14cb19da61593bded15.tar.gz AeroCore-OS-ab070aec5f1d760a2539e14cb19da61593bded15.zip | |
Merge pull request #20 from AeroCore-IO/testingtesting-candidate-44.20260910.3testing-candidate-44.20260910.2testing-candidate-44.20260910.1testing-candidate-44.20260910testing-candidate-44.20260909testing-44.20260910testing-44.20260829testing-44.20260828testing-44.20260827
Bump docker/login-action to 4.6.0 and update release workflow
| -rw-r--r-- | .github/workflows/build.yml | 25 | ||||
| -rw-r--r-- | .github/workflows/generate_release.yml | 51 | ||||
| -rwxr-xr-x | build_files/build.sh | 14 |
3 files changed, 89 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 832b9fa..78b6dc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,11 @@ on: #schedule: # - cron: '05 10 * * *' # 10:05am UTC everyday workflow_dispatch: + inputs: + handwritten: + description: "Small changelog about changes in this build" + required: false + type: string env: IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit @@ -20,6 +25,8 @@ jobs: build_push: name: Build and push image runs-on: ubuntu-24.04 + outputs: + release_tag: ${{ steps.gen-version.outputs.release_tag }} permissions: contents: read @@ -105,6 +112,8 @@ jobs: echo "ALIAS_TAGS=${ALIAS_TAGS}" } >> "$GITHUB_ENV" + echo "release_tag=${VERSION_TAG}" >> "$GITHUB_OUTPUT" + - name: Prepare environment run: | # Lowercase the image uri https://github.com/macbre/push-to-ghcr/issues/12 @@ -167,7 +176,7 @@ jobs: # These `if` statements keep pull requests from publishing packages. # They publish default-branch builds and manual testing branch builds. - name: Login to GitHub Container Registry - uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 if: github.event_name != 'pull_request' && (github.ref_name == github.event.repository.default_branch || github.ref_name == 'testing') with: registry: ghcr.io @@ -211,3 +220,17 @@ jobs: DIGEST: ${{ steps.push-image.outputs.digest }} run: | cosign sign -y --key env://COSIGN_PRIVATE_KEY "${IMAGE_REGISTRY}/${IMAGE_NAME}@${DIGEST}" + + generate_release: + name: Generate Release + needs: [build_push] + if: github.event_name != 'pull_request' && + (github.ref_name == github.event.repository.default_branch || + github.ref_name == 'testing') + permissions: + contents: write + secrets: inherit + uses: ./.github/workflows/generate_release.yml + with: + release_tag: ${{ needs.build_push.outputs.release_tag }} + handwritten: ${{ inputs.handwritten }} diff --git a/.github/workflows/generate_release.yml b/.github/workflows/generate_release.yml new file mode 100644 index 0000000..f741c83 --- /dev/null +++ b/.github/workflows/generate_release.yml @@ -0,0 +1,51 @@ +name: Generate Release + +on: + workflow_call: + inputs: + handwritten: + required: false + type: string + release_tag: + required: true + type: string + workflow_dispatch: + inputs: + handwritten: + description: 'Small changelog about changes in this build' + required: false + type: string + release_tag: + required: true + type: string + +permissions: {} + +jobs: + generate-release: + runs-on: ubuntu-24.04 + permissions: + contents: write + + + steps: + - uses: actions/checkout@v7.0.1 + with: + fetch-depth: 50 + + - name: Determine release channel + id: target + run: | + target="${GITHUB_REF_NAME}" + [[ "${target}" == "main" ]] && target="stable" + echo "target=${target}" >> "$GITHUB_OUTPUT" + + - name: Generate release + uses: softprops/action-gh-release@v3.0.2 + with: + tag_name: "${{ inputs.release_tag }}" + name: "${{ inputs.release_tag }}" + body: | + ${{ inputs.handwritten }} + prerelease: ${{ steps.target.outputs.target != 'stable' }} + make_latest: ${{ steps.target.outputs.target == 'stable' }} diff --git a/build_files/build.sh b/build_files/build.sh index 03adff0..5618d20 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,20 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# Default HDMI-CEC to putting the TV into standby when the system sleeps. +# `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep +# the default in the base image's config so users do not need to run the +# command manually after a fresh install; the runtime command can still +# change it later. +CEC_CONFIG=/etc/default/cec-control +if [[ -f "${CEC_CONFIG}" ]]; then + if grep -q '^CEC_ONSLEEP_STANDBY=' "${CEC_CONFIG}"; then + sed -i 's/^CEC_ONSLEEP_STANDBY=.*/CEC_ONSLEEP_STANDBY=true/' "${CEC_CONFIG}" + else + printf '%s\n' 'CEC_ONSLEEP_STANDBY=true' >> "${CEC_CONFIG}" + fi +fi + mkdir -p /etc/environment.d if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then |
