ngn 99a3fc5209
Some checks failed
Build and publish the docker image / build (push) Failing after 8s
update the docker build workflow
Signed-off-by: ngn <ngn@ngn.tf>
2025-01-19 03:45:09 +03:00

30 lines
820 B
YAML

name: Build and publish the docker image
on:
push:
branches: ["custom"]
env:
REGISTRY: git.ngn.tf
IMAGE: ${{gitea.repository}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: "https://github.com/actions/checkout@v4"
- name: Login to container repo
uses: "https://github.com/docker/login-action@v1"
with:
registry: ${{env.REGISTRY}}
username: ${{gitea.actor}}
password: ${{secrets.PACKAGES_TOKEN }}
- name: Build image
run: |
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest --tag ${{env.REGISTRY}}/${{env.IMAGE}}:${GITEA_REF##*/}
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:${GITEA_REF##*/}
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest