Skip to content

Commit

Permalink
Add workflow to deploy image (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hironori Yamamoto authored Jan 1, 2023
1 parent 040da7c commit e792cd0
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
61 changes: 61 additions & 0 deletions .github/workflows/deploy-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy Images

on:
push:
tags:
- "v*.*.*"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta for web
id: meta-web
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/ghcr.io/hiro-o918/redash-search-sync
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Docker meta for sync
id: meta-sync
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/ghcr.io/hiro-o918/redash-search-sync
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push (redash-search-sync)
uses: docker/build-push-action@v3
with:
context: ./redash-search-sync
push: true
tags: ${{ steps.meta-sync.outputs.tags }}
labels: ${{ steps.meta-sync.outputs.labels }}
- name: Build and push (redash-search-web)
uses: docker/build-push-action@v3
with:
context: ./redash-search-web
push: true
tags: ${{ steps.meta-web.outputs.tags }}
labels: ${{ steps.meta-web.outputs.labels }}
13 changes: 13 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: release-drafter

on:
push:
branches:
- main
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion redash-search-web/pages/api/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SearchkitSchema,
} from "@searchkit/schema";

const searchkitConfig = {
const searchkitConfig= {
host: "http://localhost:9200",
credential: {},
index: "redash",
Expand Down

0 comments on commit e792cd0

Please sign in to comment.