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
|
2024-02-13 10:46:17 +00:00
|
|
|
container: git.namesny.com/cluster/act-runner:v1
|
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 19:46:37 +00:00
|
|
|
TODAY=$(date +'%Y-%m-%d')
|
2023-12-03 17:30:38 +00:00
|
|
|
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
|
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY}
|
2023-11-25 17:50:32 +00:00
|
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
2023-11-23 19:31:38 +00:00
|
|
|
|