Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15 deployment documentation #64

Merged
merged 8 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/release-pullrequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: release-pullrequest

on:
pull_request:
branches:
- main

env:
REGISTRY: ghcr.io

jobs:
package-amd64:
runs-on: buildjet-2vcpu-ubuntu-2204
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to CR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build docker image and push
id: docker_build_amd64
uses: docker/build-push-action@v4
with:
push: false
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true

package-arm64:
runs-on: buildjet-2vcpu-ubuntu-2204-arm
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to CR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build docker image and push
id: docker_build_arm64
uses: docker/build-push-action@v4
with:
push: false
platforms: linux/arm64
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: release-tag

on:
push:
Expand Down Expand Up @@ -140,4 +140,4 @@ jobs:

- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.meta.outputs.version }}
4 changes: 2 additions & 2 deletions src/components/Widgets/EditableContent/EditableContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import remarkGfm from "remark-gfm";

const EditableContent = ({text}) => {
const [isOpen, setIsOpen] = useState<boolean>(false);
const [content, setContent] = useState<string>("");
// const [content, setContent] = useState<string>("");

const onEdit = async () => {
// call API to update
Expand Down Expand Up @@ -38,7 +38,7 @@ const EditableContent = ({text}) => {
}
>
<MDXEditor
onChange={(value) => setContent(value)}
// onChange={(value) => setContent(value)}
markdown={text}
plugins={[
markdownShortcutPlugin(),
Expand Down
4 changes: 2 additions & 2 deletions src/components/Widgets/EditableList/EditableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const EditableList = ({ description, form, endpoint, prefix, data = [], onClose

<DragDropContext onDragEnd={onDrag}>
<Droppable droppableId="droppable">
{(provided, snapshot) => (
{(provided) => (
<div
{...provided.droppableProps}
ref={provided.innerRef}
Expand All @@ -127,7 +127,7 @@ const EditableList = ({ description, form, endpoint, prefix, data = [], onClose
dataSource={list}
renderItem={(item, index) => (
<Draggable key={item.id} draggableId={item.id} index={index}>
{(provided, snapshot) => (
{(provided) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
Expand Down
Loading