mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 22:33:59 +00:00
fixed detection changed files
This commit is contained in:
13
.github/workflows/run-tests.yaml
vendored
13
.github/workflows/run-tests.yaml
vendored
@@ -9,29 +9,28 @@ name: Run tests
|
|||||||
- develop
|
- develop
|
||||||
- feature/**
|
- feature/**
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-docker-ssh:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Detect changed files
|
- name: Detect changed files
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v45
|
||||||
with:
|
with:
|
||||||
files: |
|
files: e2e-tests/mysql-ssh/Dockerfile
|
||||||
e2e-tests/mysql-ssh/Dockerfile
|
|
||||||
- name: Build mysql-ssh image
|
- name: Build mysql-ssh image
|
||||||
if: '${{ steps.filecheck.outputs.any_changed == ''true'' }}'
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
||||||
- name: Log in to GHCR
|
- name: Log in to GHCR
|
||||||
if: '${{ steps.filecheck.outputs.any_changed == ''true'' }}'
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: '${{ github.actor }}'
|
username: '${{ github.actor }}'
|
||||||
password: '${{ secrets.GITHUB_TOKEN }}'
|
password: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
- name: Push image to GHCR
|
- name: Push image to GHCR
|
||||||
if: '${{ steps.filecheck.outputs.any_changed == ''true'' }}'
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
||||||
docker push ghcr.io/dbgate/mysql-ssh:latest
|
docker push ghcr.io/dbgate/mysql-ssh:latest
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ RUN service mysql start && \
|
|||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
|
|
||||||
RUN chmod +x /start.sh
|
RUN chmod +x /start.sh
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
|||||||
@@ -8,25 +8,24 @@ on:
|
|||||||
- 'feature/**'
|
- 'feature/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-docker-ssh:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Detect changed files
|
- name: Detect changed files
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v45
|
||||||
with:
|
with:
|
||||||
files: |
|
files: e2e-tests/mysql-ssh/Dockerfile
|
||||||
e2e-tests/mysql-ssh/Dockerfile
|
|
||||||
|
|
||||||
- name: Build mysql-ssh image
|
- name: Build mysql-ssh image
|
||||||
if: ${{ steps.filecheck.outputs.any_changed == 'true' }}
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to GHCR
|
||||||
if: ${{ steps.filecheck.outputs.any_changed == 'true' }}
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@@ -34,7 +33,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Push image to GHCR
|
- name: Push image to GHCR
|
||||||
if: ${{ steps.filecheck.outputs.any_changed == 'true' }}
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
||||||
docker push ghcr.io/dbgate/mysql-ssh:latest
|
docker push ghcr.io/dbgate/mysql-ssh:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user