From 9bac7be2b6d91d3de3f844fa95b6c63c8f23e7ad Mon Sep 17 00:00:00 2001 From: staffadmin Date: Sun, 19 Nov 2023 16:09:28 +0100 Subject: [PATCH] asqdqs --- .gitea/workflows/build_and_push.yml | 22 ++++++++++++++++++++++ .gitea/workflows/build_ci.yml | 9 ++++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 .gitea/workflows/build_and_push.yml diff --git a/.gitea/workflows/build_and_push.yml b/.gitea/workflows/build_and_push.yml new file mode 100644 index 0000000..1b2415f --- /dev/null +++ b/.gitea/workflows/build_and_push.yml @@ -0,0 +1,22 @@ +name: ci/cd with perso debian image to build and push docker image in private registry + +#https://docs.docker.com/build/ci/github-actions/push-multi-registries/ +#https://www.devsync.se/ci/cd/docker/2023/10/27/gitea-runner-build-docker-containers.html + +on: [push] + +jobs: + build-push-docker-image-perso: + # see on runner /data/.runner to add label (test => test:docker://debian:bullseye) + runs-on: test + container: + image: registry.jingoh.fr/test-alpine:latest + credentials: + username: ${{ secrets.REGISTRY_DOCKER_USER }} + password: ${{ secrets.REGISTRY_DOCKER_PASS }} + # runs-on: ubuntu-latest + # container: node:16-bullseye + + steps: + - name: Show node + run: node -v diff --git a/.gitea/workflows/build_ci.yml b/.gitea/workflows/build_ci.yml index 1c2a779..4d5c520 100644 --- a/.gitea/workflows/build_ci.yml +++ b/.gitea/workflows/build_ci.yml @@ -17,9 +17,8 @@ jobs: # container: node:16-bullseye steps: - - name: Show version and repository - run: echo "Runner working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" - - run: echo "🐧 This job is now running on a ${{ runner.image }} container" + - name: Show Information + run: echo "Runner ${{ runner.os }} triggered by ${{ gitea.event_name }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" - name: Install dnsutils and git (github actions) run: | @@ -66,5 +65,5 @@ jobs: push: true tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }} - - name: Show docker images - run: docker images \ No newline at end of file + - name: Output + run: ech "Push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}" \ No newline at end of file