read-only + change builds #103
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: Dockerhub-build | |
| env: | |
| IMAGE_NAME: antlafarge/jdownloader | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths-ignore: | |
| - '**.md' | |
| - '**.MD' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| paths-ignore: | |
| - '**.md' | |
| - '**.MD' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Build: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: alpine-openjdk8 | |
| file: alpine.Dockerfile | |
| openjdk: openjdk8-jre | |
| platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | |
| - name: alpine-openjdk21 | |
| file: alpine.Dockerfile | |
| openjdk: openjdk21-jre-headless | |
| platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x | |
| - name: debian-openjdk21 | |
| file: debian.Dockerfile | |
| openjdk: openjdk-21-jre-headless | |
| platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x | |
| - name: ubuntu-openjdk21 | |
| file: ubuntu.Dockerfile | |
| openjdk: openjdk-21-jre-headless | |
| platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: ${{ matrix.name }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: Dockerfile/${{ matrix.file }} | |
| build-args: OPENJDK=${{ matrix.openjdk }} | |
| platforms: ${{ matrix.platforms }} | |
| tags: ${{ env.IMAGE_NAME }}:dev-${{ matrix.name }} | |
| push: true | |
| - name: Logout from Docker Hub | |
| run: docker logout | |
| Manifests: | |
| name: Create and push docker manifests | |
| needs: Build | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create and push manifests | |
| run: | | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-openjdk8 \ | |
| ${{ env.IMAGE_NAME }}:dev-alpine-openjdk8 | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-openjdk21 \ | |
| ${{ env.IMAGE_NAME }}:dev-alpine-openjdk21 \ | |
| ${{ env.IMAGE_NAME }}:dev-debian-openjdk21 \ | |
| ${{ env.IMAGE_NAME }}:dev-ubuntu-openjdk21 | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-alpine \ | |
| ${{ env.IMAGE_NAME }}:dev-alpine-openjdk21 \ | |
| ${{ env.IMAGE_NAME }}:dev-alpine-openjdk8 | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-debian \ | |
| ${{ env.IMAGE_NAME }}:dev-debian-openjdk21 | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-ubuntu \ | |
| ${{ env.IMAGE_NAME }}:dev-ubuntu-openjdk21 | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:dev-latest \ | |
| ${{ env.IMAGE_NAME }}:dev-alpine \ | |
| ${{ env.IMAGE_NAME }}:dev-debian \ | |
| ${{ env.IMAGE_NAME }}:dev-ubuntu | |
| - name: Logout from Docker Hub | |
| run: docker logout |