Skip to content

chore: Refactor automatic room migration logic in custompuppet.go #86

chore: Refactor automatic room migration logic in custompuppet.go

chore: Refactor automatic room migration logic in custompuppet.go #86

Workflow file for this run

name: Go
on:
push:
branches:
- master
- feat-*
- ci
tags:
- v*
env:
GO_VERSION: "1.22"
GHCR_REGISTRY_IMAGE: ghcr.io/${{ github.repository }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
export PATH="$HOME/go/bin:$PATH"
- name: Install pre-commit
run: pip install pre-commit
- name: Lint
run: pre-commit run -a
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: ${{ env.GO_VERSION }}
# cache: true
# - name: Install libolm and other dependencies
# run: sudo apt-get install libolm-dev libolm3 gobjc++-mingw-w64 gcc g++ build-essential
# - name: Set up gotestfmt
# uses: GoTestTools/gotestfmt-action@v2
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Run tests
# run: |
# go test -v -json ./... -cover | gotestfmt
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3 gobjc++-mingw-w64
- name: Build
run: bash ./build.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.GHCR_REGISTRY_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=long
type=raw,latest
- name: Docker Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.ci
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.GHCR_REGISTRY_IMAGE }}:latest
cache-to: type=inline