Skip to content

Commit 0b8df5c

Browse files
committed
update workflow
1 parent cd72ea9 commit 0b8df5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/push_to_registry.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,26 @@ jobs:
3333
- name: Check out the repo
3434
uses: actions/checkout@v3
3535

36+
- name: List modified files
37+
run: echo "FILES_MODIFIED=\"$( git diff --name-only HEAD HEAD^ )\"" >> $GITHUB_ENV
38+
3639
- name: Set up QEMU
40+
if: ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
3741
uses: docker/setup-qemu-action@v2
3842

3943
- name: Set up Docker Buildx
44+
if: ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
4045
uses: docker/setup-buildx-action@v2
4146

4247
- name: Log in to Docker Hub
48+
if: ${{ contains(env.FILES_MODIFIED, '/Dockerfile') || github.event_name == 'schedule' }}
4349
uses: docker/login-action@v2
4450
with:
4551
username: nggit
4652
password: ${{ secrets.DOCKERHUB_TOKEN }}
4753

4854
- name: Build and push nggit/${{ matrix.name }}
55+
if: ${{ contains(env.FILES_MODIFIED, matrix.file) || github.event_name == 'schedule' }}
4956
uses: docker/build-push-action@v3
5057
with:
5158
context: .

0 commit comments

Comments
 (0)