From 1e88e10d879a0ef79f0d8ba15f9d84ab5c80dd59 Mon Sep 17 00:00:00 2001 From: Bram Vandendaele Date: Tue, 26 Aug 2025 13:46:15 +0200 Subject: [PATCH] add workflows --- .gitea/workflows/gitea-actions-demo.yaml | 51 ++++++++++++++++++++ .gitea/workflows/gitea-actions-minimal.yaml | 50 +++++++++++++++++++ .gitea/workflows/gitea-actions-rocky.yaml | 50 +++++++++++++++++++ .gitea/workflows/gitea-actions-sonarqube.yml | 27 +++++++++++ 4 files changed, 178 insertions(+) create mode 100644 .gitea/workflows/gitea-actions-demo.yaml create mode 100644 .gitea/workflows/gitea-actions-minimal.yaml create mode 100644 .gitea/workflows/gitea-actions-rocky.yaml create mode 100644 .gitea/workflows/gitea-actions-sonarqube.yml diff --git a/.gitea/workflows/gitea-actions-demo.yaml b/.gitea/workflows/gitea-actions-demo.yaml new file mode 100644 index 0000000..f52d5e1 --- /dev/null +++ b/.gitea/workflows/gitea-actions-demo.yaml @@ -0,0 +1,51 @@ +name: Gitea Actions Centos +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + paths: + - 'execution-environment.yml' + - '.gitea/workflows/gitea-actions-demo.yaml' + + +jobs: + Bootstrap-runner: + runs-on: docker + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: apk add --no-cache nodejs python3 docker + - run: python -m ensurepip --upgrade + - run: python -m pip install ansible-builder + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + Create-dockerfile-with-ansible-builder: + runs-on: docker + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - name: build context + run: ansible-builder create -f execution-environment.yml -c context + - name: List files in the repository + run: | + ls ${{ gitea.workspace }}/context + - name: Login to the Container registry + uses: docker/login-action@v2 + with: + registry: git.hyperon.be + username: bramvandendaele1@gmail.com + password: ${{ secrets.CI_TOKEN }} + - name: build and push docker image + uses: https://github.com/docker/build-push-action@v5 + with: + context: context + file: context/Dockerfile + push: true + tags: git.hyperon.be/bram/ultimate-ee-centos9 diff --git a/.gitea/workflows/gitea-actions-minimal.yaml b/.gitea/workflows/gitea-actions-minimal.yaml new file mode 100644 index 0000000..bf312d3 --- /dev/null +++ b/.gitea/workflows/gitea-actions-minimal.yaml @@ -0,0 +1,50 @@ +name: Gitea Actions Minimal EE +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + paths: + - 'minimal-environment.yml' + - '.gitea/workflows/gitea-actions-minimal.yaml' + +jobs: + Bootstrap-runner: + runs-on: docker + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: apk add --no-cache nodejs python3 docker + - run: python -m ensurepip --upgrade + - run: python -m pip install ansible-builder + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + Create-dockerfile-with-ansible-builder: + runs-on: docker + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - name: build context + run: ansible-builder create -f minimal-environment.yml -c context-minimal + - name: List files in the repository + run: | + ls ${{ gitea.workspace }}/context-minimal + - name: Login to the Container registry + uses: docker/login-action@v2 + with: + registry: git.hyperon.be + username: bramvandendaele1@gmail.com + password: ${{ secrets.CI_TOKEN }} + - name: build and push docker image + uses: https://github.com/docker/build-push-action@v5 + with: + context: context-minimal + file: context-minimal/Dockerfile + push: true + tags: git.hyperon.be/bram/ultimate-ee-minimal diff --git a/.gitea/workflows/gitea-actions-rocky.yaml b/.gitea/workflows/gitea-actions-rocky.yaml new file mode 100644 index 0000000..c478ca5 --- /dev/null +++ b/.gitea/workflows/gitea-actions-rocky.yaml @@ -0,0 +1,50 @@ +name: Gitea Actions Rocky +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + paths: + - 'rocky-environment.yml' + - '.gitea/workflows/gitea-actions-rocky.yaml' + +jobs: + Bootstrap-runner: + runs-on: docker + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: apk add --no-cache nodejs python3 docker + - run: python -m ensurepip --upgrade + - run: python -m pip install ansible-builder + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + Create-dockerfile-with-ansible-builder: + runs-on: docker + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - name: build context + run: ansible-builder create -f rocky-environment.yml -c context-rocky + - name: List files in the repository + run: | + ls ${{ gitea.workspace }}/context-rocky + - name: Login to the Container registry + uses: docker/login-action@v2 + with: + registry: git.hyperon.be + username: bramvandendaele1@gmail.com + password: ${{ secrets.CI_TOKEN }} + - name: build and push docker image + uses: https://github.com/docker/build-push-action@v5 + with: + context: context-rocky + file: context-rocky/Dockerfile + push: true + tags: git.hyperon.be/bram/ultimate-ee-rocky diff --git a/.gitea/workflows/gitea-actions-sonarqube.yml b/.gitea/workflows/gitea-actions-sonarqube.yml new file mode 100644 index 0000000..1268e15 --- /dev/null +++ b/.gitea/workflows/gitea-actions-sonarqube.yml @@ -0,0 +1,27 @@ +name: Build + +on: + push: + branches: + - main + + +jobs: + build: + name: Build and analyze + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file