From 4fcde8b7ea60a97b35ba8c21f9cec24b9fbf0bee Mon Sep 17 00:00:00 2001 From: Jaye Date: Mon, 30 Jun 2025 14:52:46 +0200 Subject: [PATCH] chore: add dependabot.yml for the Dockerfile - fix missing wildfly repo URLs --- .github/dependabot.yml | 6 +++ .github/workflows/build-test-and-publish.yml | 2 + .github/workflows/pull-request-build-test.yml | 53 +++++++++++++++++++ test/test.sh | 2 + 4 files changed, 63 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/pull-request-build-test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..84c87d6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build-test-and-publish.yml b/.github/workflows/build-test-and-publish.yml index 27d253b..2ab6514 100644 --- a/.github/workflows/build-test-and-publish.yml +++ b/.github/workflows/build-test-and-publish.yml @@ -70,6 +70,7 @@ jobs: SNAPSHOT: ${{ github.event.inputs.snapshot || '' }} IMAGE_REPO_OPERATON: ${{ vars.IMAGE_REPO_OPERATON }} IMAGE_REPO_TOMCAT: ${{ vars.IMAGE_REPO_TOMCAT }} + IMAGE_REPO_WILDFLY: ${{ vars.IMAGE_REPO_WILDFLY }} - name: Test run: ./test.sh working-directory: test @@ -80,6 +81,7 @@ jobs: SNAPSHOT: ${{ github.event.inputs.snapshot || '' }} IMAGE_REPO_OPERATON: ${{ vars.IMAGE_REPO_OPERATON }} IMAGE_REPO_TOMCAT: ${{ vars.IMAGE_REPO_TOMCAT }} + IMAGE_REPO_WILDFLY: ${{ vars.IMAGE_REPO_WILDFLY }} publish: runs-on: ubuntu-24.04 needs: build-and-test diff --git a/.github/workflows/pull-request-build-test.yml b/.github/workflows/pull-request-build-test.yml new file mode 100644 index 0000000..2df8fe8 --- /dev/null +++ b/.github/workflows/pull-request-build-test.yml @@ -0,0 +1,53 @@ +on: + pull_request: + branches: + - main +jobs: + build-and-test: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + DISTRO: ["run"] + PLATFORM: ["amd64"] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: ${{ matrix.PLATFORM != 'amd64' }} + with: + platforms: ${{ matrix.PLATFORM }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Expose GitHub Runtime + uses: actions/github-script@v7 + with: + script: | + Object.keys(process.env).forEach(function (key) { + if (key.startsWith('ACTIONS_')) { + core.info(`${key}=${process.env[key]}`); + core.exportVariable(key, process.env[key]); + } + }); + - name: Build + run: ./pipeline.sh + env: + DISTRO: ${{ matrix.DISTRO }} + PLATFORM: ${{ matrix.PLATFORM }} + VERSION: 1.0.0-beta-4 + SNAPSHOT: false + IMAGE_REPO_OPERATON: ${{ vars.IMAGE_REPO_OPERATON }} + IMAGE_REPO_TOMCAT: ${{ vars.IMAGE_REPO_TOMCAT }} + IMAGE_REPO_WILDFLY: ${{ vars.IMAGE_REPO_WILDFLY }} + - name: Test + run: ./test.sh + working-directory: test + env: + DISTRO: ${{ matrix.DISTRO }} + PLATFORM: ${{ matrix.PLATFORM }} + VERSION: 1.0.0-beta-4 + SNAPSHOT: false + IMAGE_REPO_OPERATON: ${{ vars.IMAGE_REPO_OPERATON }} + IMAGE_REPO_TOMCAT: ${{ vars.IMAGE_REPO_TOMCAT }} + IMAGE_REPO_WILDFLY: ${{ vars.IMAGE_REPO_WILDFLY }} diff --git a/test/test.sh b/test/test.sh index d9c7570..a6bc917 100755 --- a/test/test.sh +++ b/test/test.sh @@ -4,6 +4,8 @@ if [ "$DISTRO" == "run" ]; then IMAGE_NAME=${IMAGE_REPO_OPERATON}:${PLATFORM} elif [ "$DISTRO" == "tomcat" ]; then IMAGE_NAME=${IMAGE_REPO_TOMCAT}:${PLATFORM} +elif [ "$DISTRO" == "wildfly" ]; then + IMAGE_NAME=${IMAGE_REPO_WILDFLY}:${PLATFORM} fi export IMAGE_NAME