Skip to content

Commit

Permalink
replaced workflows #10
Browse files Browse the repository at this point in the history
  • Loading branch information
akyriako committed Nov 5, 2024
1 parent 762fa4a commit 9ff39a4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/spa
publish_dir: ./dist/spa
38 changes: 17 additions & 21 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
name: Build and Deploy Docker Image
on:
push:
branches:
- main
# tags:
# - "v*.*.*"
# workflow_dispatch:
tags:
- "v*.*.*"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
opentelekomcloud-infra/typesense-dashboard
${{ vars.CONTAINER_REGISTRY_ORG }}/typesense-dashboard
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=raw,value=${{ steps.commit_hash.outputs.short }}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ secrets.CONTAINER_REGISTRY }}
username: ${{ secrets.DOCKER_IO_USERNAME }}
password: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }}
# - name: Login to GHCR
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
Expand All @@ -50,4 +47,3 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}

2 changes: 1 addition & 1 deletion .github/workflows/release_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Upload a Release Asset win32
run: gh release upload ${{ github.ref_name }} ./Typesense-Dashboard-win32-x64-${{ github.ref_name }}.zip --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9ff39a4

Please sign in to comment.