From 49160144d4e98884a4a9fcb6b8211d18c66767df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Tue, 19 Mar 2024 06:39:57 +0900 Subject: [PATCH] =?UTF-8?q?spec(ci):=20beta=20=E3=83=96=E3=83=A9=E3=83=B3?= =?UTF-8?q?=E3=83=81=E5=90=91=E3=81=91=E3=81=AEGitHub=20Actions=20Workflow?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20(MisskeyIO#538)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-beta.yml | 51 +++++++++++++++++++++++++++++++ .github/workflows/docker-io.yml | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker-beta.yml diff --git a/.github/workflows/docker-beta.yml b/.github/workflows/docker-beta.yml new file mode 100644 index 0000000000..b4ccd9253f --- /dev/null +++ b/.github/workflows/docker-beta.yml @@ -0,0 +1,51 @@ +name: Publish Docker image (beta) + +on: + push: + branches: + - beta + tags: + - "**" + workflow_dispatch: + +jobs: + push_to_registry: + name: Push Docker image to GitHub Container Registry + runs-on: ubuntu-22.04 + if: github.repository == 'MisskeyIO/misskey' + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + platforms: linux/amd64 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/misskeyio/misskey + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Prepare image tags + run: | + echo "FORMATTED_BRANCH_NAME=$(echo ${{ github.ref_name }} | sed -e 's/\//-/g' )" >> $GITHUB_ENV + - name: Build and Push to GitHub Container Registry + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + push: true + platforms: ${{ steps.buildx.outputs.platforms }} + provenance: false + labels: ${{ env.FORMATTED_BRANCH_NAME }} + cache-from: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache + cache-to: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache,mode=max + tags: | + ghcr.io/misskeyio/misskey:beta + ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }} diff --git a/.github/workflows/docker-io.yml b/.github/workflows/docker-io.yml index bb10e962b3..aea2a00a45 100644 --- a/.github/workflows/docker-io.yml +++ b/.github/workflows/docker-io.yml @@ -3,7 +3,7 @@ name: Publish Docker image (io) on: push: branches: - - io + - io tags: - "**" workflow_dispatch: