2023-04-09 10:53:34 +02:00
|
|
|
name: Build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
# タグ付きpushの時にする
|
|
|
|
tags:
|
|
|
|
|
|
|
|
# TODO: 後で消す
|
|
|
|
branches:
|
|
|
|
- migrate/github-actions
|
|
|
|
|
|
|
|
# 手動ビルドもできるように(いる?)
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build-images
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: "Login to GitHub Container Registry"
|
2023-04-09 10:56:32 +02:00
|
|
|
uses: docker/login-action@v2
|
2023-04-09 10:53:34 +02:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2023-04-09 11:00:01 +02:00
|
|
|
- name: Prepare image tags
|
|
|
|
run: |
|
|
|
|
echo "FORMATTED_BRANCH_NAME=$(echo ${{ github.ref_name }} | sed -e 's/\//-/g' )" >> $GITHUB_ENV
|
2023-04-09 10:53:34 +02:00
|
|
|
- name: "Build and Push"
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
ghcr.io/misskeyio/misskey:latest
|
2023-04-09 11:00:01 +02:00
|
|
|
ghcr.io/misskeyio/misskey:${FORMATTED_BRANCH_NAME}
|