fix(wordlist): crash if ADD_WORDLIST_N_RULES build arg isn't set to true #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Push container to GH registry | |
on: | |
push: | |
# branches: | |
# - "master" | |
# paths: | |
# - "**/Dockerfile" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
modified-dockerfiles: | |
name: Have any Dockerfiles been modified? | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout source | |
uses: actions/checkout@v3 | |
- | |
name: Check if any Dockerfiles were modified | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
cpu: | |
- 'cpu/Dockerfile' | |
hashcat: | |
- 'hashcat/Dockerfile' | |
nvidia: | |
- 'nvidia/Dockerfile' | |
wordlists: | |
- 'wordlists/Dockerfile' | |
build-dependencies: | |
name: Build dependencies required for core files | |
needs: [ modified-dockerfiles ] | |
strategy: | |
fail-fast: true | |
matrix: | |
image: [ wordlists, hashcat ] | |
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 }} | |
build-args: | | |
ADD_WORDLIST_N_RULES=true | |
- | |
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 }} | |
build-args: | | |
ADD_WORDLIST_N_RULES=true | |
build-container: | |
name: Building CPU and GPU images | |
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 }} |