23 lines
863 B
YAML
23 lines
863 B
YAML
name: Build docker image
|
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
on: [ push ]
|
|
|
|
jobs:
|
|
push:
|
|
runs-on: ubuntu-latest
|
|
if: gitea.ref == 'refs/heads/master'
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@v4
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: git.whimsoc.dev/hendrik/openstreetmap-tile-server
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.GITEA_TOKEN }}
|
|
- name: Build and push
|
|
run: |
|
|
TODAY=$(date +'%Y-%m-%d')
|
|
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY}
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
|
|