22 lines
No EOL
756 B
YAML
22 lines
No EOL
756 B
YAML
name: deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
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: if [ -z "$(docker images -q nseguin42/website:${{ github.sha }} 2> /dev/null)" ]; then docker build -t nseguin42/website:${{ github.sha }} .; fi
|
|
- name: docker tag
|
|
run: docker tag nseguin42/website:${{ github.sha }} nseguin42/website:latest
|
|
- name: docker push
|
|
run: docker push nseguin42/website:latest |