This commit is contained in:
parent
64c4800a76
commit
02d8a72bd0
1 changed files with 13 additions and 5 deletions
|
@ -2,21 +2,29 @@ name: deploy
|
||||||
on: [push, workflow_dispatch]
|
on: [push, workflow_dispatch]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
STORAGE_DRIVER: vfs
|
repo: documents
|
||||||
|
git: git.swablab.de
|
||||||
|
url: git.swablab.de/${{ github.repository }}
|
||||||
|
token: ${{ secrets.SWABLAB_ORGA_PACKAGE_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: deploy
|
name: deploy
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
container:
|
container:
|
||||||
image: quay.io/buildah/stable:latest
|
image: quay.io/buildah/stable:latest
|
||||||
if: github.ref == 'refs/heads/main'
|
env:
|
||||||
|
STORAGE_DRIVER: vfs
|
||||||
steps:
|
steps:
|
||||||
|
- name: download
|
||||||
|
run: curl https://${{ env.url }}/archive/main.tar.gz | tar -xz
|
||||||
|
|
||||||
- name: login
|
- name: login
|
||||||
run: buildah login -u token -p ${{ secrets.SWABLAB_ORGA_PACKAGE_TOKEN }} git.swablab.de
|
run: buildah login -u token -p ${{ env.token }} ${{ env.git }}
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: buildah build -t git.swablab.de/${{ github.repository }}:latest ${{ github.server_url }}/${{ github.repository }}.git
|
run: buildah build -f ${{ env.repo }}/Containerfile -t ${{ env.url }}:latest ${{ env.repo }}
|
||||||
|
|
||||||
- name: push
|
- name: push
|
||||||
run: buildah push git.swablab.de/${{ github.repository }}:latest
|
run: buildah push ${{ env.git }}/${{ github.repository }}:latest
|
||||||
|
|
Loading…
Add table
Reference in a new issue