Skip to content

Discover Versions #4258

Discover Versions

Discover Versions #4258

name: Discover Versions
on:
workflow_dispatch:
inputs:
force:
required: false
type: boolean
schedule:
- cron: '0 * * * *'
jobs:
discover:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.2.20'
- name: Install Nixpacks
run: curl -sSL https://nixpacks.com/install.sh | bash
- name: Install Packages
run: bun i
- name: Run Discover Versions
run: bun start ${{ github.event.inputs.force == 'true' && '--force' || '' }}
working-directory: 'scripts/check-versions'
- name: Debug - Check for changes
run: |
echo "=== Git Status ==="
git status
echo ""
echo "=== Changed files ==="
git diff --name-only
echo ""
echo "=== Untracked files ==="
git ls-files --others --exclude-standard
echo ""
echo "=== All changes ==="
git status --porcelain
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: Add new container versions
branch: update-container-versions
delete-branch: true
title: 'chore: Update container versions'
body: |
Automated container version updates discovered by the version checker.
committer: metorial[bot] <[email protected]>
author: metorial[bot] <[email protected]>
add-paths: |
.
- name: Enable Auto-merge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --auto --squash "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Output PR Info
if: steps.cpr.outputs.pull-request-operation == 'created'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"