1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 05:38:12 +09:00

chore(ci): update github actions

This commit is contained in:
オスカー、 2024-06-20 03:37:39 +09:00
parent 352da51413
commit bdcc3c43ec
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7
11 changed files with 18 additions and 134 deletions

View File

@ -3,9 +3,7 @@ name: Check Misskey JS version
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/misskey-js/package.json
- package.json

View File

@ -1,49 +0,0 @@
name: Publish Docker image (beta)
on:
push:
branches:
- beta
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 }}

View File

@ -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 }}

View File

@ -1,18 +1,18 @@
name: Publish Docker image (io)
name: Publish Docker Image
on:
push:
branches:
- io
- hotomoe
tags:
- '**-io.*'
- '**-hotomoe.*'
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-22.04
if: github.repository == 'MisskeyIO/misskey'
if: github.repository == 'hotomoe/hotomoe'
steps:
- name: Check out the repo
uses: actions/checkout@v4
@ -25,7 +25,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/misskeyio/misskey
images: ghcr.io/hotomoe/hotomoe
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@ -44,8 +44,8 @@ jobs:
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
cache-from: type=registry,ref=ghcr.io/hotomoe/hotomoe:hotomoe-buildcache
cache-to: type=registry,ref=ghcr.io/hotomoe/hotomoe:hotomoe-buildcache,mode=max
tags: |
ghcr.io/misskeyio/misskey:latest
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}
ghcr.io/hotomoe/hotomoe:latest
ghcr.io/hotomoe/hotomoe:${{ env.FORMATTED_BRANCH_NAME }}

View File

@ -3,9 +3,7 @@ name: Dockle
on:
push:
branches:
- beta
- io
- host
- hotomoe
pull_request:
jobs:
@ -20,7 +18,7 @@ jobs:
context: .
push: false
provenance: false
cache-from: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache
cache-from: type=registry,ref=ghcr.io/hotomoe/hotomoe:hotomoe-buildcache
tags: |
misskey:scan
- name: Run dockle

View File

@ -3,9 +3,7 @@ name: Lint
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/backend/**
- packages/frontend/**

View File

@ -3,9 +3,7 @@ name: Test (backend)
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/backend/**
# for permissions

View File

@ -3,9 +3,7 @@ name: Test (frontend)
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/frontend/**
# for permissions

View File

@ -6,9 +6,7 @@ name: Test (misskey.js)
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/misskey-js/**
pull_request:

View File

@ -3,9 +3,7 @@ name: Test (production install and build)
on:
push:
branches:
- beta
- io
- host
- hotomoe
pull_request:
env:

View File

@ -3,9 +3,7 @@ name: Test (backend)
on:
push:
branches:
- beta
- io
- host
- hotomoe
paths:
- packages/backend/**
pull_request: