From e6d72e9f870f0dc24cb3d63b3a5bb37c02cc9314 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 16 Mar 2023 09:56:39 +0100 Subject: [PATCH] test --- .github/workflows/proudction-release-test.yml | 40 +++++++ .../workflows/staging-release-dockerhub.yml | 92 +++++++++++++++ .github/workflows/staging-release-ghcr.yml | 105 ------------------ .github/workflows/staging-release.yml | 95 +++++++++------- 4 files changed, 186 insertions(+), 146 deletions(-) create mode 100644 .github/workflows/proudction-release-test.yml create mode 100644 .github/workflows/staging-release-dockerhub.yml delete mode 100644 .github/workflows/staging-release-ghcr.yml diff --git a/.github/workflows/proudction-release-test.yml b/.github/workflows/proudction-release-test.yml new file mode 100644 index 000000000..470b38851 --- /dev/null +++ b/.github/workflows/proudction-release-test.yml @@ -0,0 +1,40 @@ +name: production-release-test + +on: + release: + types: [prereleased] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: "coollabsio/coolify-test" + +jobs: + amd64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + \ No newline at end of file diff --git a/.github/workflows/staging-release-dockerhub.yml b/.github/workflows/staging-release-dockerhub.yml new file mode 100644 index 000000000..71847aeba --- /dev/null +++ b/.github/workflows/staging-release-dockerhub.yml @@ -0,0 +1,92 @@ +name: staging-release + +on: + push: + paths: + - "**" + - "!others/fluentbit" + - "!others/pocketbase" + - "!.github/workflows/fluent-bit-release.yml" + - "!.github/workflows/pocketbase-release.yml" + branches: + - "not-existing-branch" + +jobs: + arm64: + runs-on: [self-hosted, arm64] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "next" + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get current package version + uses: martinbeentjes/npm-get-version-action@v1.2.3 + id: package-version + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/arm64 + push: true + tags: coollabsio/coolify:next-arm64 + cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-arm64 + cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-arm64,mode=max + amd64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "next" + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get current package version + uses: martinbeentjes/npm-get-version-action@v1.2.3 + id: package-version + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: true + tags: coollabsio/coolify:next + cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-amd64 + cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-amd64,mode=max + merge-manifest: + runs-on: ubuntu-latest + needs: [arm64, amd64] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create & publish manifest + run: | + docker buildx imagetools create --append coollabsio/coolify:next-arm64 --tag coollabsio/coolify:next + - uses: sarisia/actions-status-discord@v1 + if: always() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK_DEV_RELEASE_CHANNEL }} diff --git a/.github/workflows/staging-release-ghcr.yml b/.github/workflows/staging-release-ghcr.yml deleted file mode 100644 index 19e3e7b2f..000000000 --- a/.github/workflows/staging-release-ghcr.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: staging-release-ghcr - -on: - push: - paths: - - "**" - - "!others/fluentbit" - - "!others/pocketbase" - - "!.github/workflows/fluent-bit-release.yml" - - "!.github/workflows/pocketbase-release.yml" - branches: - - ghcr -env: - REGISTRY: ghcr.io - IMAGE_NAME: "coollabsio/coolify-test" - -jobs: - amd64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: "next" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - arm64: - runs-on: [self-hosted, arm64] - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: "next" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }}-arm64 - labels: ${{ steps.meta.outputs.labels }} - merge-manifest: - runs-on: ubuntu-latest - needs: [amd64, arm64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Create & publish manifest - run: | - docker buildx imagetools create --append ${{ steps.meta.outputs.tags }}-arm64 --tag ${{ steps.meta.outputs.tags }} - # - uses: sarisia/actions-status-discord@v1 - # if: always() - # with: - # webhook: ${{ secrets.DISCORD_WEBHOOK_DEV_RELEASE_CHANNEL }} diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index e52db63da..fd86fb234 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -9,37 +9,12 @@ on: - "!.github/workflows/fluent-bit-release.yml" - "!.github/workflows/pocketbase-release.yml" branches: - - next + - "not-existing-branch" # should be !main +env: + REGISTRY: ghcr.io + IMAGE_NAME: "coollabsio/coolify" jobs: - arm64: - runs-on: [self-hosted, arm64] - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: "next" - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current package version - uses: martinbeentjes/npm-get-version-action@v1.2.3 - id: package-version - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/arm64 - push: true - tags: coollabsio/coolify:next-arm64 - cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-arm64 - cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-arm64,mode=max amd64: runs-on: ubuntu-latest steps: @@ -54,23 +29,55 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current package version - uses: martinbeentjes/npm-get-version-action@v1.2.3 - id: package-version + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64 push: true - tags: coollabsio/coolify:next - cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-amd64 - cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-amd64,mode=max + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + arm64: + runs-on: [self-hosted, arm64] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "next" + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }}-arm64 + labels: ${{ steps.meta.outputs.labels }} merge-manifest: runs-on: ubuntu-latest - needs: [arm64, amd64] + needs: [amd64, arm64] steps: - name: Checkout uses: actions/checkout@v3 @@ -81,11 +88,17 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Create & publish manifest run: | - docker buildx imagetools create --append coollabsio/coolify:next-arm64 --tag coollabsio/coolify:next + docker buildx imagetools create --append ${{ steps.meta.outputs.tags }}-arm64 --tag ${{ steps.meta.outputs.tags }} - uses: sarisia/actions-status-discord@v1 if: always() with: