diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 14fd0b042a..71efd82429 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,21 +28,23 @@ defaults: shell: bash jobs: - version: - name: Read the version + plan: + name: Plan build permissions: contents: read runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 outputs: - coolify: ${{ inputs.coolify || steps.version.outputs.coolify }} + coolify: ${{ inputs.coolify || steps.plan.outputs.coolify }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - - id: version + - name: Plan the Coolify version + id: plan env: BRANCH: ${{ github.base_ref || github.ref_name }} PULL_REQUEST: ${{ github.event.pull_request.number }} @@ -51,8 +53,8 @@ jobs: echo "coolify=$coolify" >> "$GITHUB_OUTPUT" build: - name: Build ${{ matrix.platform }} - needs: version + name: Build image (${{ matrix.platform }}) + needs: plan permissions: contents: read runs-on: ${{ matrix.runner }} # https://github.com/actions/runner-images @@ -68,12 +70,13 @@ jobs: arch: arm64 runner: ubuntu-26.04-arm steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - - name: Set the build arguments + - name: Read the commit date and hash id: args run: | { @@ -81,11 +84,13 @@ jobs: echo "sha=$(git rev-parse HEAD)" } >> "$GITHUB_OUTPUT" - - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # https://github.com/docker/setup-buildx-action/releases/tag/v4.4.1 + - name: Set up Buildx + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # https://github.com/docker/setup-buildx-action/releases/tag/v4.4.1 with: cache-binary: false - - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # https://github.com/docker/build-push-action/releases/tag/v7.4.0 + - name: Build the image + uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # https://github.com/docker/build-push-action/releases/tag/v7.4.0 with: context: . file: docker/production/Dockerfile @@ -93,11 +98,12 @@ jobs: tags: coollabsio/coolify:test outputs: type=oci,dest=${{ runner.temp }}/image,tar=false,rewrite-timestamp=true build-args: | - COOLIFY_VERSION=${{ needs.version.outputs.coolify }} + COOLIFY_VERSION=${{ needs.plan.outputs.coolify }} SOURCE_DATE_EPOCH=${{ steps.args.outputs.epoch }} GIT_SHA=${{ steps.args.outputs.sha }} - - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # https://github.com/actions/upload-artifact/releases/tag/v7.0.2 + - name: Upload the image + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # https://github.com/actions/upload-artifact/releases/tag/v7.0.2 with: name: image-${{ matrix.arch }} path: ${{ runner.temp }}/image diff --git a/.github/workflows/clean-manifests.yaml b/.github/workflows/clean-manifests.yaml index 28cfebfebb..1679ad669f 100644 --- a/.github/workflows/clean-manifests.yaml +++ b/.github/workflows/clean-manifests.yaml @@ -17,7 +17,7 @@ defaults: jobs: clean: - name: Clean + name: Clean manifests if: ${{ github.repository == 'coollabsio/coolify' }} permissions: contents: read diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a3ef53d687..8f64941d57 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -18,23 +18,25 @@ defaults: shell: bash jobs: - version: - name: Select the main build + plan: + name: Plan build if: ${{ github.repository == 'coollabsio/coolify' }} permissions: contents: read runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 outputs: - build: ${{ steps.version.outputs.build }} + build: ${{ steps.plan.outputs.build }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out main + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: ref: main fetch-depth: 0 persist-credentials: false - - id: version + - name: Plan the main build + id: plan env: BRANCH: main run: | @@ -47,29 +49,31 @@ jobs: build: name: Build - needs: version - if: ${{ needs.version.outputs.build != '' }} + needs: plan + if: ${{ needs.plan.outputs.build != '' }} permissions: contents: read uses: $/.github/workflows/build.yaml with: - ref: ${{ fromJSON(needs.version.outputs.build).revision }} - coolify: ${{ fromJSON(needs.version.outputs.build).image }} + ref: ${{ fromJSON(needs.plan.outputs.build).revision }} + coolify: ${{ fromJSON(needs.plan.outputs.build).image }} publish: - name: Move the main tag + name: Publish image needs: build permissions: packages: write # push the built main to ghcr.io and move the main tag runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 30 steps: - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 + - name: Download the built images + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 with: pattern: image-* path: ${{ runner.temp }}/images - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to ghcr.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/merge-forward.yaml b/.github/workflows/merge-forward.yaml index f96ce1061b..77228afe0a 100644 --- a/.github/workflows/merge-forward.yaml +++ b/.github/workflows/merge-forward.yaml @@ -27,12 +27,13 @@ jobs: runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 persist-credentials: false - - name: Merge main into the release branches and next, the release branches into next + - name: Merge main into the release branches and next, and each release branch into next env: GH_TOKEN: ${{ github.token }} run: | diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 86a49459d1..49755a44e7 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -18,23 +18,25 @@ defaults: shell: bash jobs: - version: - name: Select the nightly + plan: + name: Plan nightly if: ${{ github.repository == 'coollabsio/coolify' }} permissions: contents: read runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 outputs: - nightly: ${{ steps.version.outputs.nightly }} + nightly: ${{ steps.plan.outputs.nightly }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out next + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: ref: next fetch-depth: 0 persist-credentials: false - - id: version + - name: Plan the nightly + id: plan env: BRANCH: next run: | @@ -47,18 +49,18 @@ jobs: build: name: Build - needs: version - if: ${{ needs.version.outputs.nightly != '' }} + needs: plan + if: ${{ needs.plan.outputs.nightly != '' }} permissions: contents: read uses: $/.github/workflows/build.yaml with: - ref: ${{ fromJSON(needs.version.outputs.nightly).revision }} - coolify: ${{ fromJSON(needs.version.outputs.nightly).image }} + ref: ${{ fromJSON(needs.plan.outputs.nightly).revision }} + coolify: ${{ fromJSON(needs.plan.outputs.nightly).image }} publish: - name: Publish ${{ matrix.line.tag }} - needs: [version, build] + name: Publish nightly (${{ matrix.line.tag }}) + needs: [plan, build] permissions: packages: write # push the built nightly to ghcr.io and move the nightly tag environment: @@ -68,20 +70,23 @@ jobs: timeout-minutes: 30 strategy: matrix: - line: ${{ fromJSON(needs.version.outputs.nightly).lines }} + line: ${{ fromJSON(needs.plan.outputs.nightly).lines }} steps: - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 + - name: Download the built images + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 with: pattern: image-* path: ${{ runner.temp }}/images - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to ghcr.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to docker.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -102,8 +107,8 @@ jobs: done cdn: - name: Sync the nightly channel of the CDN - needs: [version, publish] + name: Sync CDN + needs: [plan, publish] permissions: contents: read environment: @@ -112,14 +117,16 @@ jobs: runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the nightly + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: - ref: ${{ fromJSON(needs.version.outputs.nightly).revision }} + ref: ${{ fromJSON(needs.plan.outputs.nightly).revision }} persist-credentials: false - - env: + - name: Sync the nightly channel of the CDN + env: GH_TOKEN: ${{ secrets.CDN_TOKEN }} - IMAGE_VERSION: ${{ fromJSON(needs.version.outputs.nightly).image }} + IMAGE_VERSION: ${{ fromJSON(needs.plan.outputs.nightly).image }} run: | gh auth setup-git git config --global user.name "github-actions[bot]" diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 0cf851be0f..2d7c710c1e 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -24,7 +24,7 @@ jobs: uses: $/.github/workflows/build.yaml publish: - name: Publish pr-${{ github.event.pull_request.number }} + name: Publish image needs: build if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} permissions: @@ -32,12 +32,14 @@ jobs: runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 30 steps: - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 + - name: Download the built images + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 with: pattern: image-* path: ${{ runner.temp }}/images - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to ghcr.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 93973338e0..d6614d9027 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,22 +26,24 @@ defaults: shell: bash jobs: - version: - name: Select the releases + plan: + name: Plan releases if: ${{ github.repository == 'coollabsio/coolify' }} permissions: contents: read runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 outputs: - releases: ${{ steps.version.outputs.releases }} + releases: ${{ steps.plan.outputs.releases }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 persist-credentials: false - - id: version + - name: Plan the releases + id: plan env: BRANCH: ${{ github.ref_name }} run: | @@ -50,15 +52,15 @@ jobs: build: name: Build - needs: version - if: ${{ needs.version.outputs.releases != '[]' }} + needs: plan + if: ${{ needs.plan.outputs.releases != '[]' }} permissions: contents: read uses: $/.github/workflows/build.yaml publish: - name: Publish ${{ matrix.release.tag }} - needs: [version, build] + name: Publish release (${{ matrix.release.tag }}) + needs: [plan, build] permissions: contents: write # create the GitHub release and its tag packages: write # push the built images to ghcr.io @@ -69,24 +71,28 @@ jobs: timeout-minutes: 30 strategy: matrix: - release: ${{ fromJSON(needs.version.outputs.releases) }} + release: ${{ fromJSON(needs.plan.outputs.releases) }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: persist-credentials: false - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 + - name: Download the built images + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # https://github.com/actions/download-artifact/releases/tag/v8.0.2 with: pattern: image-* path: ${{ runner.temp }}/images - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to ghcr.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to docker.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -116,7 +122,7 @@ jobs: gh release create "$TAG" "${args[@]}" tags: - name: Move the tags + name: Move tags needs: publish permissions: contents: write # mark the GitHub release that latest points at as the latest release @@ -129,7 +135,8 @@ jobs: outputs: tags: ${{ steps.plan.outputs.tags }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 persist-credentials: false @@ -140,13 +147,15 @@ jobs: tags="$(scripts/plan-version.sh --tags)" echo "tags=$tags" | tee -a "$GITHUB_OUTPUT" - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to ghcr.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 + - name: Log in to docker.io + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # https://github.com/docker/login-action/releases/tag/v4.7.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -169,7 +178,7 @@ jobs: run: gh release edit "$LATEST" --latest cdn: - name: Sync the CDN + name: Sync CDN needs: tags if: ${{ needs.tags.outputs.tags != '{}' }} permissions: @@ -180,7 +189,8 @@ jobs: runs-on: ubuntu-26.04 # https://github.com/actions/runner-images timeout-minutes: 10 steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 persist-credentials: false