2023-11-20 21:42:19 +01:00
|
|
|
name: deploy
|
2023-11-20 21:39:37 +01:00
|
|
|
|
2023-11-20 21:42:19 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
2023-11-20 21:39:37 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-11-21 19:54:47 +01:00
|
|
|
docker:
|
2023-11-20 21:39:37 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-21 20:08:54 +01:00
|
|
|
- name: Install docker
|
|
|
|
run: apt update && apt install -y docker.io
|
|
|
|
|
2023-11-21 19:54:47 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: https://github.com/actions/checkout@v3
|
2023-11-20 21:50:29 +01:00
|
|
|
|
2023-11-21 19:54:47 +01:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: https://github.com/docker/setup-qemu-action@v3
|
2023-11-21 20:08:54 +01:00
|
|
|
with:
|
2023-11-21 20:13:46 +01:00
|
|
|
platforms: amd64
|
2023-11-20 21:50:29 +01:00
|
|
|
|
2023-11-21 19:54:47 +01:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
2023-11-20 21:50:29 +01:00
|
|
|
|
2023-11-21 19:54:47 +01:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: https://github.com/docker/login-action@v3
|
2023-11-20 21:50:29 +01:00
|
|
|
with:
|
2023-11-21 19:54:47 +01:00
|
|
|
registry: gitea.mrdev023.fr
|
2023-11-21 20:28:51 +01:00
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
2023-11-20 21:50:29 +01:00
|
|
|
|
2023-11-21 19:54:47 +01:00
|
|
|
- name: Build and push
|
|
|
|
uses: https://github.com/docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
tags: gitea.mrdev023.fr/mrdev023/portfolio:latest
|