Docker Build and Push #101
This file contains hidden or 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: Docker Build and Push | |
| on: | |
| schedule: | |
| - cron: "0 9 * * 3" # Wednesday 9 AM | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| docker-build-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: main | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.HUB_DOCKER_COM_USERNAME }} | |
| password: ${{ secrets.HUB_DOCKER_COM_PASSWORD }} | |
| - name: Build and push tor variant | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile-tor | |
| platforms: linux/arm64,linux/amd64 | |
| push: true | |
| tags: divax/i2p:current-i2p-tor | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push regular variant | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/arm64,linux/amd64 | |
| push: true | |
| tags: divax/i2p:current | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |