Skip to content

Commit

Permalink
fix(actions): wait for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimura committed Feb 14, 2024
1 parent b0cd0ac commit e233754
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
wordlists:
- 'wordlists/Dockerfile'
build-container:
build-dependencies:
needs: [ modified-dockerfiles ]
strategy:
fail-fast: true
matrix:
image: [ wordlists, hashcat, cpu, nvidia ]
matrix:
image: [ wordlists, hashcat ]
runs-on: ubuntu-latest
needs: [ modified-dockerfiles ]
steps:
-
-
name: Checkout source
uses: actions/checkout@v3

Expand Down Expand Up @@ -77,7 +77,53 @@ jobs:
if: steps.changes.outputs.${{ matrix.image }} == 'true'
uses: docker/build-push-action@v4
with:
file: ${{ matrix.image }}/Dockerfile
push: true
tags: yimura/crackerjack-docker:${{ matrix.image }}
build-args: |
ADD_WORDLIST_N_RULES=true
build-container:
needs: [ build-dependencies ]
strategy:
fail-fast: true
matrix:
image: [ cpu, nvidia ]
runs-on: ubuntu-latest
steps:
-
name: Checkout source
uses: actions/checkout@v3

-
name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: yimura
password: ${{ secrets.PACKAGE_WRITE_TOKEN }}

-
name: Build and push container
if: steps.changes.outputs.${{ matrix.image }} == 'true'
uses: docker/build-push-action@v4
with:
file: ${{ matrix.image }}/Dockerfile
push: true
tags: ghcr.io/yimura/crackerjack-docker:${{ matrix.image }}

-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: yimura
password: ${{ secrets.DOCKER_TOKEN }}

-
name: Build and push container
if: steps.changes.outputs.${{ matrix.image }} == 'true'
uses: docker/build-push-action@v4
with:
file: ${{ matrix.image }}/Dockerfile
push: true
tags: yimura/crackerjack-docker:${{ matrix.image }}

0 comments on commit e233754

Please sign in to comment.