This commit is contained in:
parent
6c5f7be675
commit
d7f8f441fd
1 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,9 @@
|
||||||
name: deploy
|
name: deploy
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
repo: documents
|
repo: documents
|
||||||
|
@ -11,20 +15,19 @@ 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: docker:cli
|
||||||
env:
|
env:
|
||||||
STORAGE_DRIVER: vfs
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
||||||
steps:
|
steps:
|
||||||
- name: download
|
- name: download
|
||||||
run: curl https://${{ env.url }}/archive/main.tar.gz | tar -xz
|
run: wget -O- https://${{ env.url }}/archive/main.tar.gz | tar -xz
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: buildah build -f ${{ env.repo }}/Containerfile -t ${{ env.url }}:latest ${{ env.repo }}
|
run: docker buildx build -f ${{ env.repo }}/Containerfile -t ${{ env.url }}:latest ${{ env.repo }}
|
||||||
|
|
||||||
- name: login
|
- name: login
|
||||||
run: buildah login -u token -p ${{ env.token }} ${{ env.git }}
|
run: docker login -u token -p ${{ env.token }} ${{ env.git }}
|
||||||
|
|
||||||
- name: push
|
- name: push
|
||||||
run: buildah push ${{ env.git }}/${{ github.repository }}:latest
|
run: docker push ${{ env.git }}/${{ github.repository }}:latest
|
||||||
|
|
Loading…
Add table
Reference in a new issue