chore: check driver load status #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
docker-hariko: | |
if: github.repository == 'misskey-dev/0key.dev' | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
outputs: | |
digest: ${{ steps.build.outputs.digest }} | |
steps: | |
- uses: actions/checkout@v4.1.6 | |
- uses: docker/login-action@v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: build | |
run: | | |
docker build -t "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-hariko" . | |
docker push "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-hariko" | |
echo "digest=$(docker image ls --format '{{.Digest}}' | head -n1)" > $GITHUB_OUTPUT | |
working-directory: hariko | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
docker-misskey: | |
if: github.repository == 'misskey-dev/0key.dev' | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
outputs: | |
digest: ${{ steps.build.outputs.digest }} | |
steps: | |
- uses: actions/checkout@v4.1.6 | |
with: | |
submodules: true | |
- uses: docker/login-action@v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: Homebrew/actions/setup-homebrew@master | |
- id: build | |
run: | | |
head=$(git rev-parse HEAD) | |
repository=$(mktemp -d) | |
cd $repository | |
git init | |
git remote add origin https://github.com/misskey-dev/misskey.git | |
git fetch --depth=1 origin $head | |
git checkout FETCH_HEAD | |
brew install jaq | |
jaq --in-place ".version += \"-$(git rev-parse --abbrev-ref HEAD).$(git rev-parse HEAD)\"" package.json | |
docker build -t "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey" . | |
docker push "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey" | |
echo "digest=$(docker image ls --format '{{.Digest}}' | head -n1)" > $GITHUB_OUTPUT | |
working-directory: misskey | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
helm: | |
if: github.repository == 'misskey-dev/0key.dev' | |
needs: | |
- docker-hariko | |
- docker-misskey | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4.1.6 | |
with: | |
fetch-depth: 0 | |
- id: version | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
echo revision=$(git log --oneline | wc -l) > $GITHUB_OUTPUT | |
- uses: azure/setup-helm@v4.2.0 | |
with: | |
version: v3.15.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: mikefarah/yq@v4.44.1 | |
with: | |
cmd: | | |
yq -i ".version += \\"${{ steps.version.outputs.revision }}\\"" charts/hariko/Chart.yaml | |
yq -i ".version += \\"${{ steps.version.outputs.revision }}\\"" charts/misskey/Chart.yaml | |
yq -i ".image.index = \\"ghcr.io/misskey-dev/0key.dev@${{ needs.docker-hariko.outputs.digest }}\\"" charts/hariko/values.yaml | |
yq -i ".image.index = \\"ghcr.io/misskey-dev/0key.dev@${{ needs.docker-misskey.outputs.digest }}\\"" charts/misskey/values.yaml | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
- uses: helm/chart-releaser-action@v1.6.0 | |
env: | |
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} |