30 lines
789 B
YAML
30 lines
789 B
YAML
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
|