From f5a6ca18f0e7ac6a4e57487fd7549f7fcd381a29 Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Fri, 3 Jan 2025 08:12:11 +0100 Subject: [PATCH] run test containers - standalone workflow --- .github/workflows/build-tests-containers.yaml | 31 +++++++++++++++++ .github/workflows/run-tests.yaml | 18 ---------- .../build-tests-containers.yaml | 33 +++++++++++++++++++ workflow-templates/run-tests.yaml | 30 ----------------- 4 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/build-tests-containers.yaml create mode 100644 workflow-templates/build-tests-containers.yaml diff --git a/.github/workflows/build-tests-containers.yaml b/.github/workflows/build-tests-containers.yaml new file mode 100644 index 000000000..65af39e71 --- /dev/null +++ b/.github/workflows/build-tests-containers.yaml @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# This file is generated. Do not edit manually +# -------------------------------------------------------------------------------------------- +name: Build test containers +'on': + push: + branches: + - master + - develop + - feature/** + paths: + - e2e-tests/mysql-ssh/Dockerfile +jobs: + build-docker-ssh: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Build mysql-ssh image + run: | + docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh + - name: Log in to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: Push image to GHCR + run: | + docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest + docker push ghcr.io/dbgate/mysql-ssh:latest diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index a5ebeff5e..1481f70ad 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -9,24 +9,6 @@ name: Run tests - develop - feature/** jobs: - build-docker-ssh: - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Build mysql-ssh image - run: | - docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh - - name: Log in to GHCR - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - - name: Push image to GHCR - run: | - docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest - docker push ghcr.io/dbgate/mysql-ssh:latest test: needs: build-docker-ssh runs-on: ubuntu-latest diff --git a/workflow-templates/build-tests-containers.yaml b/workflow-templates/build-tests-containers.yaml new file mode 100644 index 000000000..ad1e438eb --- /dev/null +++ b/workflow-templates/build-tests-containers.yaml @@ -0,0 +1,33 @@ +name: Build test containers + +on: + push: + branches: + - master + - develop + - 'feature/**' + paths: + - "e2e-tests/mysql-ssh/Dockerfile" + +jobs: + build-docker-ssh: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Build mysql-ssh image + run: | + docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh + + - name: Log in to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push image to GHCR + run: | + docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest + docker push ghcr.io/dbgate/mysql-ssh:latest diff --git a/workflow-templates/run-tests.yaml b/workflow-templates/run-tests.yaml index 189bf4f94..5504ace31 100644 --- a/workflow-templates/run-tests.yaml +++ b/workflow-templates/run-tests.yaml @@ -8,36 +8,6 @@ on: - 'feature/**' jobs: - build-docker-ssh: - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v3 - - # - name: Detect changed files - # uses: tj-actions/changed-files@v45 - # with: - # files: e2e-tests/mysql-ssh/Dockerfile - - - name: Build mysql-ssh image - # if: steps.changed-files-specific.outputs.any_changed == 'true' - run: | - docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh - - - name: Log in to GHCR - # if: steps.changed-files-specific.outputs.any_changed == 'true' - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Push image to GHCR - # if: steps.changed-files-specific.outputs.any_changed == 'true' - run: | - docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest - docker push ghcr.io/dbgate/mysql-ssh:latest - test: needs: build-docker-ssh runs-on: ubuntu-latest