chore(ci): change workflow
This commit is contained in:
parent
0ada62c1a2
commit
eb046a2059
3 changed files with 10 additions and 110 deletions
51
.github/workflows/docker-host.yml
vendored
51
.github/workflows/docker-host.yml
vendored
|
@ -1,51 +0,0 @@
|
||||||
name: Publish Docker image (host)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- host
|
|
||||||
tags:
|
|
||||||
- '**-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 }}
|
|
51
.github/workflows/docker-io.yml
vendored
51
.github/workflows/docker-io.yml
vendored
|
@ -1,51 +0,0 @@
|
||||||
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@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:latest
|
|
||||||
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}
|
|
|
@ -1,16 +1,18 @@
|
||||||
name: Publish Docker image (beta)
|
name: Publish Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- beta
|
- oscar
|
||||||
|
tags:
|
||||||
|
- '**-oscar.*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
name: Push Docker image to GitHub Container Registry
|
name: Push Docker image to GitHub Container Registry
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
if: github.repository == 'MisskeyIO/misskey'
|
if: github.repository == 'SWREI/oscar_surf'
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -23,7 +25,7 @@ jobs:
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/misskeyio/misskey
|
images: ghcr.io/swrei/misskey
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
@ -42,8 +44,8 @@ jobs:
|
||||||
platforms: ${{ steps.buildx.outputs.platforms }}
|
platforms: ${{ steps.buildx.outputs.platforms }}
|
||||||
provenance: false
|
provenance: false
|
||||||
labels: ${{ env.FORMATTED_BRANCH_NAME }}
|
labels: ${{ env.FORMATTED_BRANCH_NAME }}
|
||||||
cache-from: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache
|
cache-from: type=registry,ref=ghcr.io/swrei/misskey:oscar-buildcache
|
||||||
cache-to: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache,mode=max
|
cache-to: type=registry,ref=ghcr.io/swrei/misskey:oscar-buildcache,mode=max
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/misskeyio/misskey:beta
|
ghcr.io/swrei/misskey:latest
|
||||||
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}
|
ghcr.io/swrei/misskey:${{ env.FORMATTED_BRANCH_NAME }}
|
Loading…
Add table
Add a link
Reference in a new issue