Compare commits

...

4 Commits

Author SHA1 Message Date
61976fa2af [test build push docker image] 2024-11-23 18:01:08 +01:00
75bf25d041 [test build push docker image] 2024-11-23 17:50:51 +01:00
20e2b5d51b [test runner] 2024-11-23 17:43:18 +01:00
11dcd2625a [test runner] 2024-11-23 17:38:57 +01:00
3 changed files with 17 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ jobs:
# container: debian:bullseye # container: debian:bullseye
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
# container: node:16-bullseye # container: node:16-bullseye
runs-on: docker runs-on: debian-runner
container: container:
image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
credentials: credentials:
@@ -24,15 +24,9 @@ jobs:
- name: Show Information - name: Show Information
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- 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: clone & build & push - name: clone & build & push
run: | run: |
echo "${{ secrets.REGISTRY_DOCKER_PASS }}" | docker login -u ${{ secrets.REGISTRY_DOCKER_USER }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
git clone https://github.com/EnableSecurity/wafw00f git clone https://github.com/EnableSecurity/wafw00f
cd wafw00f cd wafw00f
docker buildx b . -t ${{ vars.DOCKER_IMAGE_WAFWOOF }} docker buildx b . -t ${{ vars.DOCKER_IMAGE_WAFWOOF }}

View File

@@ -10,8 +10,8 @@ on:
- '*-runner' - '*-runner'
jobs: jobs:
build-and-push-debian-runner: build-and-push:
# see on runner /data/.runner to add label (test => test:docker://debian:bullseye) #! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
# runs-on: test # runs-on: test
# container: debian:bullseye # container: debian:bullseye
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
@@ -29,8 +29,18 @@ jobs:
steps: steps:
- name: Show Information - name: Show Information
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- name: docker login - name: login & clone & build & push
run : echo "${{ secrets.REGISTRY_DOCKER_PASS }}" | docker login -u ${{ secrets.REGISTRY_DOCKER_USER }} -p ${{ vars.REGISTRY_DOCKER }} run: |
echo "${{ secrets.REGISTRY_DOCKER_PASS }}" | docker login -u ${{ secrets.REGISTRY_DOCKER_USER }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
git clone https://${{ secrets.REGISTRY_DOCKER_PASS }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.REGISTRY_DOCKER_USER }}/${{ vars.DOCKER_IMAGE_NAME }}
cd ${{ vars.DOCKER_IMAGE_NAME }}
docker buildx b . -t ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}
docker tag ${{ vars.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}
docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest
# - name: Git clone private repository # - name: Git clone private repository
# uses: actions/checkout@v4 # uses: actions/checkout@v4
# with: # with:

View File

@@ -4,7 +4,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: on:
push: push:
tags: tags:
- '*' - '*-demo'
## Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml ## Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
jobs: jobs: