diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 3701235..0f0e820 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -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 @@ -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 }}