replaced build action

This commit is contained in:
Hendrik Behme 2024-08-13 12:49:35 +02:00
parent 8d3dfc24bc
commit 99893aea87

View File

@ -12,15 +12,21 @@ jobs:
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: git.whimsoc.dev/hendrik/openstreetmap-tile-server registry: git.whimsoc.dev/hendrik/openstreetmap-tile-server
username: ${{ github.repository_owner }} username: ${{ gitea.repository_owner }}
password: ${{ secrets.GITEA_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
- name: Set up Docker Buildx # - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3 # uses: docker/setup-buildx-action@v3
# - name: Build and push Docker image
# uses: https://github.com/docker/build-push-action@v6
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: "git.whimsoc.dev/hendrik/openstreetmap-tile-server:${{gitea.sha}},git.whimsoc.dev/hendrik/openstreetmap-tile-server:latest"
- 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
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: "git.whimsoc.dev/hendrik/openstreetmap-tile-server:${{gitea.sha}},git.whimsoc.dev/hendrik/openstreetmap-tile-server:latest"