mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-23 14:46:40 +09:00
a5a1518e6d
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: Publish Docker image (io)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- io
|
|
tags:
|
|
- '**-io.*'
|
|
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@v6
|
|
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:latest
|
|
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}
|