add act_runner build job
All checks were successful
Build docker image and push to registry.bitdeals.org / main-build-job (push) Successful in 2m51s
All checks were successful
Build docker image and push to registry.bitdeals.org / main-build-job (push) Successful in 2m51s
This commit is contained in:
32
.gitea/workflows/build.yaml
Normal file
32
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Build docker image and push to registry.bitdeals.org
|
||||||
|
run-name: docker build and docker push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main-build-job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
VERSION: 1.0
|
||||||
|
COMMIT: ${{ gitea.sha }}
|
||||||
|
REPOSITORY: ${{ gitea.repository }}
|
||||||
|
#registry.bitdeals.org
|
||||||
|
REGISTRY: 10.0.3.111:5000
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Build docker app image
|
||||||
|
run: |
|
||||||
|
docker build . \
|
||||||
|
--file "$(find ./Dockerfile ./docker/Dockerfile -print -quit 2>/dev/null)" \
|
||||||
|
--label "git-commit=$COMMIT" \
|
||||||
|
--tag "$REGISTRY"/"${REPOSITORY##*/}":"$VERSION"."${COMMIT::7}" \
|
||||||
|
--tag "$REGISTRY"/"${REPOSITORY##*/}":latest
|
||||||
|
- name: Push images to registry
|
||||||
|
run: |
|
||||||
|
docker push "$REGISTRY"/${REPOSITORY##*/}:$VERSION.${COMMIT::7} ; \
|
||||||
|
docker push "$REGISTRY"/${REPOSITORY##*/}:latest
|
||||||
|
|
||||||
Reference in New Issue
Block a user