This commit is contained in:
parent
911bdc39a0
commit
d52e8777e8
3 changed files with 40 additions and 1 deletions
30
.forgejo/workflows/deploy.yml
Normal file
30
.forgejo/workflows/deploy.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: deploy
|
||||||
|
on: [push, workflow_dispatch]
|
||||||
|
|
||||||
|
env:
|
||||||
|
repo: directus
|
||||||
|
git: git.swablab.de
|
||||||
|
url: git.swablab.de/${{ github.repository }}
|
||||||
|
token: ${{ secrets.SWABLAB_ORGA_PACKAGE_TOKEN }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: deploy
|
||||||
|
runs-on: docker
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
container:
|
||||||
|
image: quay.io/buildah/stable:latest
|
||||||
|
env:
|
||||||
|
STORAGE_DRIVER: vfs
|
||||||
|
steps:
|
||||||
|
- name: download
|
||||||
|
run: curl https://${{ env.url }}/archive/main.tar.gz | tar -xz
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: buildah build -f ${{ env.repo }}/Containerfile -t ${{ env.url }}:latest ${{ env.repo }}
|
||||||
|
|
||||||
|
- name: login
|
||||||
|
run: buildah login -u token -p ${{ env.token }} ${{ env.git }}
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
run: buildah push ${{ env.git }}/${{ github.repository }}:latest
|
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
|
@ -3,7 +3,7 @@
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "install",
|
"label": "install",
|
||||||
"command": "npm i",
|
"command": "npm install",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
|
|
9
Containerfile
Normal file
9
Containerfile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
FROM docker.io/library/node AS build
|
||||||
|
COPY . .
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM docker.io/directus/directus
|
||||||
|
RUN mkdir /directus/extensions/directus-extension-swablab
|
||||||
|
COPY --from=build ./package.json /directus/extensions/directus-extension-swablab/package.json
|
||||||
|
COPY --from=build ./dist /directus/extensions/directus-extension-swablab/dist
|
Loading…
Add table
Reference in a new issue