general cleanup
All checks were successful
Build and publish the docker image / build (push) Successful in 18s
All checks were successful
Build and publish the docker image / build (push) Successful in 18s
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
30
.gitea/workflows/build.yml
Normal file
30
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,30 @@
|
||||
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: |
|
||||
hash=${{gitea.sha}}
|
||||
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest --tag ${{env.REGISTRY}}/${{env.IMAGE}}:${hash::7}
|
||||
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:${hash::7}
|
||||
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
Reference in New Issue
Block a user