website/.forgejo/workflows/deploy.yaml
2023-12-10 20:35:08 -06:00

25 lines
No EOL
727 B
YAML

name: deploy
on:
release:
types:
- published
- edited
jobs:
deploy:
runs-on: docker
container:
image: nseguin42/forgejo-runner:ubuntu
env:
DOCKER_HOST: tcp://0.0.0.0:2375
steps:
- name: docker login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- uses: actions/checkout@v4
- name: docker build
run: docker build -t nseguin42/website:latest .
- name: docker tag
run: docker tag nseguin42/website:latest nseguin42/website:${{ github.sha }}
- name: docker push
run: docker push nseguin42/website:latest && docker push nseguin42/website:${{ github.sha }}