Skip to content

Commit

Permalink
Setup GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Sep 16, 2024
1 parent bbb67b1 commit 9b7f0df
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-bun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docker image (bun)

on:
push:
branches:
- bun
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-bun
cache-to: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache-bun,mode=max
tags: |
ghcr.io/misskeyio/misskey:bun
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}

0 comments on commit 9b7f0df

Please sign in to comment.