Dockerfile: add gcc powerpc64 #48
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: Publish to Github Container Registry | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: rehosting-arc | |
| steps: | |
| - name: Trust Harbor's self-signed certificate | |
| run: | | |
| echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}" | |
| openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null | |
| sudo update-ca-certificates | |
| - name: 'Login to Github Container Registry' | |
| uses: docker/[email protected] | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/[email protected] | |
| with: | |
| username: rehosting | |
| password: ${{secrets.DOCKERHUB_TOKEN}} | |
| - name: Log in to Rehosting Arc Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{secrets.REHOSTING_ARC_REGISTRY}} | |
| username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }} | |
| password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }} | |
| - name: 'Checkout code' | |
| uses: actions/checkout@v4 | |
| - name: Get next version | |
| uses: reecetech/[email protected] | |
| id: version | |
| with: | |
| use_api: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: | | |
| image=moby/buildkit:master | |
| network=host | |
| buildkitd-config-inline: | | |
| [registry."${{ secrets.REHOSTING_ARC_REGISTRY }}"] | |
| insecure = true | |
| http = true | |
| - name: Build embedded-toolchains docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ github.repository }}:latest | |
| ${{ github.repository }}:${{ github.ref_name }} | |
| ${{ github.repository }}:${{ steps.version.outputs.v-version }} | |
| ghcr.io/${{ github.repository }}:latest | |
| ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| ghcr.io/${{ github.repository }}:${{ steps.version.outputs.v-version }} | |
| target: final | |
| build-args: | | |
| REGISTRY=${{ secrets.REHOSTING_ARC_REGISTRY }}/proxy | |
| cache-from: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/rehosting/embedded-toolchains:cache,mode=max | |
| cache-to: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/rehosting/embedded-toolchains:cache,mode=max | |
| outputs: type=docker | |
| - name: Build embedded-toolchains docker image (rust) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| target: rust | |
| tags: | | |
| ${{ github.repository }}_rust:latest | |
| ${{ github.repository }}_rust:${{ github.ref_name }} | |
| ${{ github.repository }}_rust:${{ steps.version.outputs.v-version }} | |
| ghcr.io/${{ github.repository }}_rust:latest | |
| ghcr.io/${{ github.repository }}_rust:${{ github.ref_name }} | |
| ghcr.io/${{ github.repository }}_rust:${{ steps.version.outputs.v-version }} | |
| build-args: | | |
| REGISTRY=${{ secrets.REHOSTING_ARC_REGISTRY }}/proxy | |
| cache-from: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/rehosting/embedded-toolchains_rust:cache,mode=max | |
| cache-to: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/rehosting/embedded-toolchains_rust:cache,mode=max | |
| - name: Create release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: softprops/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.version.outputs.v-version }} | |
| name: Release ${{ steps.version.outputs.v-version }} | |
| body: | | |
| Release ${{ steps.version.outputs.v-version }} | |
| draft: false | |
| generate_release_notes: true | |
| prerelease: false | |
| files: igloo_driver.tar.gz | |
| build-arch: | |
| runs-on: rehosting-arc | |
| strategy: | |
| matrix: | |
| arch: [armel, arm64, mipseb, mipsel, mips64eb, mips64el, powerpc, powerpcle, powerpc64, powerpc64le, loongarch64, riscv64, x86_64] | |
| steps: | |
| - name: 'Checkout code' | |
| uses: actions/checkout@v4 | |
| - name: Get next version | |
| uses: reecetech/[email protected] | |
| id: version | |
| with: | |
| use_api: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: | | |
| image=moby/buildkit:master | |
| network=host | |
| buildkitd-config-inline: | | |
| [registry."${{ secrets.REHOSTING_ARC_REGISTRY }}"] | |
| insecure = true | |
| http = true | |
| - name: Trust Harbor's self-signed certificate | |
| run: | | |
| echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}" | |
| openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null | |
| sudo update-ca-certificates | |
| - name: Login to registries | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: rehosting | |
| password: ${{secrets.DOCKERHUB_TOKEN}} | |
| - name: Log in to Rehosting Arc Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{secrets.REHOSTING_ARC_REGISTRY}} | |
| username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }} | |
| password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }} | |
| - name: Build and push ${{ matrix.arch }} image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ github.repository }}:${{ matrix.arch }} | |
| ${{ github.repository }}:${{ matrix.arch }}_latest | |
| ${{ github.repository }}:${{ matrix.arch }}_${{ github.ref_name }} | |
| ${{ github.repository }}:${{ matrix.arch }}_${{ steps.version.outputs.v-version }} | |
| ghcr.io/${{ github.repository }}:${{ matrix.arch }} | |
| ghcr.io/${{ github.repository }}:${{ matrix.arch }}_latest | |
| ghcr.io/${{ github.repository }}:${{ matrix.arch }}_${{ github.ref_name }} | |
| ghcr.io/${{ github.repository }}:${{ matrix.arch }}_${{ steps.version.outputs.v-version }} | |
| target: ${{ matrix.arch }} | |
| cache-from: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/${{ github.repository }}:${{ matrix.arch }}_cache,mode=max | |
| cache-to: | | |
| type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/${{ github.repository }}:${{ matrix.arch }}_cache,mode=max | |
| build-args: | | |
| REGISTRY=${{ secrets.REHOSTING_ARC_REGISTRY }}/proxy |