fix(deps): update renovate/renovate docker tag 43.138.0 → 43.138.2 (#… #1860
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - apps/** | |
| - .github/scripts/container-docs.sh | |
| - .github/workflows/release.yaml | |
| workflow_dispatch: | |
| inputs: | |
| app: | |
| type: string | |
| description: App Name | |
| required: true | |
| release: | |
| type: boolean | |
| description: Release | |
| required: false | |
| default: false | |
| jobs: | |
| prepare: | |
| name: Prepare | |
| runs-on: | |
| group: default | |
| outputs: | |
| changed-files: ${{ steps.changed-files.outputs.changed_files }} | |
| steps: | |
| - name: Get Changed Files | |
| uses: bjw-s-labs/action-changed-files@a9a36fb08ce06db9b02fbd8026cc2c0945eb9841 # v0.6.0 | |
| id: changed-files | |
| with: | |
| path: apps | |
| include_only_directories: true | |
| max_depth: 1 | |
| changed: | |
| if: ${{ needs.prepare.outputs.changed-files != '[]' || github.event_name == 'workflow_dispatch' }} | |
| name: Get Changed Apps | |
| needs: | |
| - prepare | |
| runs-on: | |
| group: default | |
| outputs: | |
| apps: ${{ steps.apps.outputs.apps }} | |
| steps: | |
| - name: Get Apps | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| id: apps | |
| env: | |
| APPS: ${{ github.event_name == 'workflow_dispatch' && inputs.app || join(fromJSON(needs.prepare.outputs.changed-files), ' ') }} | |
| with: | |
| script: |- | |
| const { APPS } = process.env; | |
| const appsToBuild = APPS.split(' ').filter(Boolean); | |
| core.setOutput('apps', JSON.stringify(appsToBuild)); | |
| console.log('apps:', JSON.stringify(appsToBuild, null, 2)); | |
| core.summary.addHeading('Apps to build:').addList(appsToBuild).write(); | |
| build: | |
| if: ${{ needs.changed.outputs.apps != '[]' }} | |
| name: Build ${{ matrix.app }} | |
| needs: | |
| - changed | |
| uses: ./.github/workflows/app-builder.yaml | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| packages: write | |
| security-events: write | |
| secrets: inherit | |
| strategy: | |
| matrix: | |
| app: ${{ fromJSON(needs.changed.outputs.apps) }} | |
| fail-fast: false | |
| max-parallel: 4 | |
| with: | |
| app: ${{ matrix.app }} | |
| release: ${{ github.event_name == 'workflow_dispatch' && inputs.release || github.event_name == 'push' }} | |
| container-docs: | |
| if: ${{ !cancelled() && !contains(needs.build.result, 'failure') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | |
| name: Container Docs | |
| needs: | |
| - build | |
| runs-on: | |
| group: default | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Forgetool | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ inputs.token }} | |
| run: |- | |
| TAG="" | |
| if RELEASES_JSON="$(curl -fsSL \ | |
| https://api.github.com/repos/trueforge-org/forgetool/releases)"; then | |
| TAG="$(jq -r '[.[] | |
| | select(.prerelease == true) | |
| | .tag_name | |
| | select(test("^(forgetool-)?v[0-9]+\\.[0-9]+\\.[0-9]+-ALPHA[0-9]+$")) | |
| | {tag: ., alpha: (capture("ALPHA(?<n>[0-9]+)$").n | tonumber)} | |
| ] | if length > 0 then max_by(.alpha).tag else empty end' <<< "${RELEASES_JSON}")" | |
| fi | |
| [ -n "${TAG}" ] && [ "${TAG}" != "null" ] || TAG="v4.0.0-ALPHA24" | |
| VERSION="${TAG#v}" | |
| VERSION="${VERSION#forgetool-v}" | |
| case "$(uname -m)" in | |
| x86_64) ARCH="amd64" ;; | |
| aarch64) ARCH="arm64" ;; | |
| *) echo "Unsupported uname architecture: $(uname -m). Supported uname values: x86_64, aarch64." && exit 1 ;; | |
| esac | |
| curl -fsSL -o "${RUNNER_TEMP}/forgetool.tar.gz" "https://github.com/trueforge-org/forgetool/releases/download/${TAG}/forgetool_${VERSION}_linux_${ARCH}.tar.gz" || { echo "Failed to download forgetool release ${TAG} for linux_${ARCH}"; exit 1; } | |
| mkdir -p "${RUNNER_TEMP}/forgetool-bin" | |
| tar -xzf "${RUNNER_TEMP}/forgetool.tar.gz" -C "${RUNNER_TEMP}/forgetool-bin" forgetool || { echo "Failed to extract forgetool binary from archive"; exit 1; } | |
| chmod +x "${RUNNER_TEMP}/forgetool-bin/forgetool" | |
| echo "${RUNNER_TEMP}/forgetool-bin" >> "${GITHUB_PATH}" | |
| - name: Checkout website repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: trueforge-org/websites | |
| path: website | |
| ref: main | |
| token: "${{ secrets.BOT_TOKEN }}" | |
| - name: Generate container list | |
| run: | | |
| forgetool containers genlist ./apps | |
| mkdir -p website/containerforge/src/assets | |
| mv -f containers.json website/containerforge/src/assets/containers.json | |
| - name: Fix Pre-Commit issues | |
| run: | | |
| echo "Running pre-commit test-and-cleanup..." | |
| pre-commit run --all ||: | |
| # Fix sh files to always be executable | |
| find . -name '*.sh' | xargs chmod +x | |
| - name: Get Changelog Format Version | |
| run: | | |
| ver="1" | |
| rev="1" | |
| key="changelog-format-$ver-rev-$rev" | |
| echo "Cache Key is: $key" | |
| echo "CHANGELOG_CACHE_KEY=$key" >> $GITHUB_ENV | |
| - name: Cache Changelog | |
| id: cache-changelog | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| with: | |
| key: ${{ env.CHANGELOG_CACHE_KEY }}-${{ hashFiles('**/docker-bake.hcl') }} | |
| path: changelog.json.gz | |
| restore-keys: | | |
| ${{ env.CHANGELOG_CACHE_KEY }}-${{ hashFiles('**/docker-bake.hcl') }} | |
| ${{ env.CHANGELOG_CACHE_KEY }}- | |
| - name: Generate changelogs | |
| run: | | |
| export REPO_PATH="./" | |
| export TEMPLATE_PATH="./templates/CHANGELOG.md.tmpl" | |
| export OUTPUT_DIR="./changelogs" | |
| export JSON_FILE="changelog.json" | |
| if [ -f "$JSON_FILE.gz" ]; then | |
| gunzip "$JSON_FILE.gz" --force | |
| fi | |
| forgetool containers genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$OUTPUT_DIR" | |
| gzip "$JSON_FILE" --best || echo "Compression failed, ignoring..." | |
| - name: Copy docs to website | |
| run: | | |
| #!/bin/bash | |
| echo "Making sure directories exist..." | |
| mkdir -p website/containerforge/public/img/hotlink-ok/container-icons || echo "container-icons path already exists, continuing..." | |
| mkdir -p website/containerforge/public/img/hotlink-ok/container-icons-small || echo "container-icons-small path already exists, continuing..." | |
| mkdir -p website/containerforge/public/img/hotlink-ok/container-screenshots || echo "container-screenshots path already exists, continuing..." | |
| # Save description-list.mdx if it exists (maintained separately by website repo) | |
| if [ -f ./website/containerforge/src/content/docs/containers/description-list.mdx ]; then | |
| mv -f ./website/containerforge/src/content/docs/containers/description-list.mdx ./description-list.mdx | |
| fi | |
| # Remove old container docs to clean up stale/deleted/renamed apps | |
| echo "Removing old container docs..." | |
| rm -rf ./website/containerforge/src/content/docs/containers | |
| # Recreate the base directory | |
| mkdir -p ./website/containerforge/src/content/docs/containers/ | |
| # Restore description-list.mdx | |
| if [ -f ./description-list.mdx ]; then | |
| mv -f ./description-list.mdx ./website/containerforge/src/content/docs/containers/description-list.mdx | |
| fi | |
| # Copy changelogs to docs | |
| echo "Copying changelogs to docs" | |
| mkdir -p ./changelogs | |
| if [ -n "$(find ./changelogs -mindepth 1 -type d)" ]; then | |
| cp -r ./changelogs/** ./website/containerforge/src/content/docs/containers/ | |
| else | |
| echo "No directories in ./changelogs. Skipping copy." | |
| fi | |
| export DEBUG=false | |
| export STRICT=true | |
| for app_dir in apps/*/docker-bake.hcl; do | |
| app=$(basename "$(dirname "$app_dir")") | |
| ./.github/scripts/container-docs.sh "${app}" | |
| done | |
| - name: Commit and push changes | |
| run: | | |
| cd website | |
| git config user.name "TrueForge-Bot" | |
| git config user.email "[email protected]" | |
| # Ensure we rebase in case there are changes from other sources in-between | |
| git stash push --include-untracked -m "autogenerated ContainerForge changes" | |
| git pull --rebase origin main | |
| git stash pop | |
| git add . | |
| git diff-index --quiet HEAD || git commit -m "Update website with latest container docs" | |
| git push origin main | |
| status: | |
| if: ${{ !cancelled() }} | |
| name: Build Success | |
| needs: | |
| - build | |
| - container-docs | |
| runs-on: | |
| group: default | |
| steps: | |
| - name: Any jobs failed? | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| run: |- | |
| exit 1 | |
| - name: All jobs passed or skipped? | |
| if: ${{ !(contains(needs.*.result, 'failure')) }} | |
| run: |- | |
| echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" |