2023-11-23 18:13:55 +00:00
|
|
|
name: Build website container
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build image
|
|
|
|
runs-on: ubuntu-latest
|
2023-11-23 18:26:01 +00:00
|
|
|
container: ghcr.io/catthehacker/ubuntu:act-latest
|
2023-11-23 18:13:55 +00:00
|
|
|
env:
|
|
|
|
IMAGE_NAME: namesny-com
|
|
|
|
REGISTRY: git.namesny.com
|
2023-11-25 15:55:34 +00:00
|
|
|
REPO_OWNER: mathis
|
2023-11-23 18:13:55 +00:00
|
|
|
steps:
|
2023-11-23 19:31:38 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: git.namesny.com
|
|
|
|
username: ${{ gitea.actor }}
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push
|
2023-11-25 15:46:09 +00:00
|
|
|
run: |
|
2023-11-25 15:57:02 +00:00
|
|
|
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${{ gitea.sha }} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
2023-11-25 17:50:32 +00:00
|
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${{ gitea.sha }}
|
|
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
2023-11-23 19:31:38 +00:00
|
|
|
|