Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
add PR-test for testing docker-compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
FarisZR committed Feb 2, 2024
1 parent 617f62a commit dcc842a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test docker-compose files

on:
pull_request:
paths:
- '**/docker-compose.yml'
- '**/docker-compose.yaml'

## Thanks Bing AI!

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Compose
uses: ndeloof/[email protected]
- run: docker compose --version

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
**/docker-compose.yml
**/docker-compose.yaml
- name: Test docker-compose files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Testing $file"
docker compose -f $file config
docker compose -f $file pull
done

0 comments on commit dcc842a

Please sign in to comment.