diff --git a/.github/workflows/docker-beta.yml b/.github/workflows/docker-beta.yml index b4ccd9253f..ca497500b6 100644 --- a/.github/workflows/docker-beta.yml +++ b/.github/workflows/docker-beta.yml @@ -4,8 +4,6 @@ on: push: branches: - beta - tags: - - "**" workflow_dispatch: jobs: diff --git a/.github/workflows/docker-host.yml b/.github/workflows/docker-host.yml new file mode 100644 index 0000000000..40ac20b585 --- /dev/null +++ b/.github/workflows/docker-host.yml @@ -0,0 +1,51 @@ +name: Publish Docker image (host) + +on: + push: + branches: + - host + tags: + - '[0-9.]+-host.*' + 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:host-buildcache + cache-to: type=registry,ref=ghcr.io/misskeyio/misskey:host-buildcache,mode=max + tags: | + ghcr.io/misskeyio/misskey:host + ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }} diff --git a/.github/workflows/docker-io.yml b/.github/workflows/docker-io.yml index aea2a00a45..4a2d038ea0 100644 --- a/.github/workflows/docker-io.yml +++ b/.github/workflows/docker-io.yml @@ -5,7 +5,7 @@ on: branches: - io tags: - - "**" + - '[0-9.]+-io.*' workflow_dispatch: jobs: