From 13c0f3c59824ad93b396556c31082aa01c2c3800 Mon Sep 17 00:00:00 2001 From: staffadmin Date: Mon, 20 Nov 2023 15:22:26 +0100 Subject: [PATCH] test --- .gitea/workflows/build_image_wafwoof.yml | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitea/workflows/build_image_wafwoof.yml diff --git a/.gitea/workflows/build_image_wafwoof.yml b/.gitea/workflows/build_image_wafwoof.yml new file mode 100644 index 0000000..2c245a7 --- /dev/null +++ b/.gitea/workflows/build_image_wafwoof.yml @@ -0,0 +1,50 @@ +name: ci/cd to build and push docker image wafwoof in private registry + +on: + push: + tags: + # Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner) + - '*-waf' + +jobs: + build-and-push-image: + # see on runner /data/.runner to add label (test => test:docker://debian:bullseye) + # runs-on: test + # container: debian:bullseye + # runs-on: ubuntu-latest + # container: node:16-bullseye + runs-on: debian-runner + container: + image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest + credentials: + username: ${{ secrets.REGISTRY_DOCKER_USER }} + password: ${{ secrets.REGISTRY_DOCKER_PASS }} + + + steps: + - name: Show Information + run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" + + - name: Git clone private repository + uses: actions/checkout@v4 + with: + repository: EnableSecurity/wafw00f + github-server-url: https://github.com + #token: ${{ secrets.REPO_PULL_GITEA }} + + - name: Login to docker private registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.REGISTRY_DOCKER }} + username: ${{ secrets.REGISTRY_DOCKER_USER }} + password: ${{ secrets.REGISTRY_DOCKER_PASS }} + + - name: Build and push image in registry + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_WAFWOOF }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_WAFWOOF }}:${{ gitea.ref_name }} + + - name: Output + run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_WAFWOOF }} tag ${{ gitea.ref_name }}" \ No newline at end of file