Files
obsidian-api/.gitea/workflows/prod-docker-images.yml
T
daniel156161 576a26bc9b
Build and Push Docker Container / build-and-push (push) Successful in 3m44s
fix(ci): publish Docker image to org namespace
- Push obsidian-api image to the docker package namespace.

- Match the image name used by Terraform and Portainer.

- Avoid publishing deployment images under the personal user namespace.
2026-06-24 10:13:42 +02:00

51 lines
1.3 KiB
YAML

name: Build and Push Docker Container
on:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:
env:
IMAGE_NAME: obsidian-api
OBSIDIAN_VERSION: "1.12.7"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Rewrite SSH submodule URLs to HTTPS for CI
run: |
git config --global url."https://x-token:${{ secrets.ACTION_ACCESS_TOKEN }}@git.yiprawr.dev/".insteadOf "git@git.yiprawr.dev:"
- name: Checkout repository
uses: actions/checkout@v6
with:
token: "${{ secrets.ACTION_ACCESS_TOKEN }}"
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker registry
uses: docker/login-action@v4
with:
registry: ${{ vars.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.ACTION_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
build-args: |
OBSIDIAN_VERSION=${{ env.OBSIDIAN_VERSION }}
tags: |
${{ vars.DOCKER_REGISTRY_URL }}/docker/${{ env.IMAGE_NAME }}:latest