Fix schema creation (#29) #215
Workflow file for this run
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: goreleaser | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
tests: | |
uses: ./.github/workflows/tests.yml | |
build-web: | |
runs-on: ubuntu-latest | |
needs: [tests] | |
outputs: | |
web-build: ${{ steps.build.outputs.web-build }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install Dependencies | |
run: npm install --prefix web | |
- name: Build Web Part | |
run: npm run build --prefix web | |
- name: Archive Web Build | |
id: build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: web-build | |
path: web/build | |
goreleaser: | |
needs: build-web | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.21.0' | |
- name: Download Web Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: web-build | |
path: web/build | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }} | |
publish-docker: | |
needs: goreleaser | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: pijng/moonlogs | |
- name: Build and push Docker image | |
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
trigger-ruby-client: | |
needs: publish-docker | |
name: Trigger Ruby Client Workflow | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Tag Version | |
id: get_tag_version | |
run: echo "::set-output name=tag_version::${GITHUB_REF#refs/tags/v}" | |
- name: Trigger Ruby Client Workflow | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.RUBY_SDK_TOKEN }} | |
repository: pijng/moonlogs-ruby | |
event-type: generate-publish-client | |
client-payload: '{"tag_version": "${{ steps.get_tag_version.outputs.tag_version }}"}' | |
trigger-typescript-client: | |
needs: publish-docker | |
name: Trigger Typescript Client Workflow | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Tag Version | |
id: get_tag_version | |
run: echo "::set-output name=tag_version::${GITHUB_REF#refs/tags/v}" | |
- name: Trigger Typescript Client Workflow | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.TS_SDK_TOKEN }} | |
repository: pijng/moonlogs-ts | |
event-type: generate-publish-client | |
client-payload: '{"tag_version": "${{ steps.get_tag_version.outputs.tag_version }}"}' | |