Release #752
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
| name: Release | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Every day at midnight | |
| workflow_dispatch: | |
| inputs: | |
| bun-versions: | |
| description: "Bun version, comma separated (e.g. 0.0.1,0.0.2,1.0.8-canary.20231104.1)" | |
| required: false | |
| default: "" | |
| nodejs-version: | |
| description: "Node.js version, comma separated (e.g. 14.7.4,17.3.8,18.4.5)" | |
| required: false | |
| default: "" | |
| distros: | |
| description: "Distro, comma separated (e.g. alpine,debian-slim,debian)" | |
| required: false | |
| default: "" | |
| # TODO: To be implemented | |
| # skip-check: | |
| # description: "Skip version check" | |
| # required: false | |
| # default: "true" | |
| env: | |
| REGISTRY: imbios | |
| PLATFORMS: linux/amd64,linux/arm64 | |
| NODE_MAJOR_VERSIONS_TO_CHECK: 20,22,24,25 | |
| NODE_VERSIONS_TO_BUILD: "" | |
| BUN_TAGS_TO_CHECK: canary,latest | |
| BUN_VERSIONS_TO_BUILD: "" | |
| DISTROS: alpine,debian-slim,debian | |
| jobs: | |
| # TODO: To be implemented | |
| # test-job: | |
| # uses: ./.github/workflows/ci.yml | |
| build-job: | |
| # TODO: To be implemented | |
| # needs: test-job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@635640504f6d7197d3bb29876a652f671028dc97 | |
| - run: bun install | |
| - name: Check for new releases of nodejs and bun | |
| if: ${{ inputs.nodejs-version == '' && inputs.bun-versions == '' && inputs.distros == '' }} | |
| run: | | |
| set -e | |
| echo "NODE_VERSIONS_TO_BUILD=$(bun run check-bun-node.ts --node ${{ env.NODE_MAJOR_VERSIONS_TO_CHECK }})" >> $GITHUB_ENV | |
| echo "BUN_VERSIONS_TO_BUILD=$(bun run check-bun-node.ts --bun ${{ env.BUN_TAGS_TO_CHECK }})" >> $GITHUB_ENV | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 | |
| name: Build and push Docker images | |
| with: | |
| timeout_minutes: 120 | |
| max_attempts: 3 | |
| retry_on: error | |
| command: ./build_updated.sh | |
| env: | |
| REGISTRY: ${{ env.REGISTRY }} | |
| PLATFORMS: ${{ env.PLATFORMS }} | |
| NODE_VERSIONS_TO_BUILD: ${{ env.NODE_VERSIONS_TO_BUILD || inputs.nodejs-version }} | |
| BUN_VERSIONS_TO_BUILD: ${{ env.BUN_VERSIONS_TO_BUILD || inputs.bun-versions }} | |
| DISTROS: ${{ env.DISTROS || inputs.distros }} | |
| - name: Commit changes | |
| run: ./commit_changes.sh | |
| env: | |
| BUN_VERSIONS_TO_BUILD: ${{ env.BUN_VERSIONS_TO_BUILD }} | |
| NODE_VERSIONS_TO_BUILD: ${{ env.NODE_VERSIONS_TO_BUILD }} | |
| DISTROS: ${{ env.DISTROS }} | |
| - name: Pull changes | |
| run: git pull -r | |
| - name: Push changes | |
| uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| rerun-failed-jobs: | |
| runs-on: ubuntu-latest | |
| needs: [build-job] | |
| if: failure() | |
| steps: | |
| - name: Rerun failed jobs in the current workflow | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh run rerun ${{ github.run_id }} --repo ${{ github.repository }} --failed |