-
Notifications
You must be signed in to change notification settings - Fork 34
ARM Docker Container and Minor Bug Fix #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a65c9f9
Decouple build flows and add linux/arm64 support
Xeratec fe56d46
Support CCache on GitHub
Xeratec f760f5a
Support multi-arch manifest
Xeratec 4a98964
Fix banshee pointer issue
Xeratec dd9bbbb
Remove Docker layer caching
Xeratec a616e04
Add Docker layer caching for Deeploy Docker
Xeratec adcb9e8
Fix broken vscode config
Xeratec ecf1d0b
Bump pulp-sdk
Xeratec 2d1db21
Extend Changelog
Xeratec 49ab9ee
Fix README
Xeratec fc9ce8d
Implement feedback from PR
Xeratec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| name: BuildDockerDeeploy | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| docker_image_toolchain: | ||
| description: 'Deeploy Toolchain Image to use' | ||
| required: false | ||
| default: 'ghcr.io/pulp-platform/deeploy-toolchain:latest' | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Fetch branch name or tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| docker_tag: ${{ steps.generate_tag.outputs.docker_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up environment variables | ||
| run: | | ||
| echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV | ||
|
|
||
| - name: Set Docker tag | ||
| id: generate_tag | ||
| run: | | ||
| if [[ "${{ env.IS_TAG }}" == "tag" ]]; then | ||
| echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| build-deeploy: | ||
| name: Build Deploy Image | ||
| needs: [ prepare ] | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: [amd64, arm64] | ||
| include: | ||
| - platform: amd64 | ||
| runner: ubuntu-latest | ||
| - platform: arm64 | ||
| runner: ubuntu-22.04-arm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Free up disk space | ||
| uses: jlumbroso/free-disk-space@v1.3.1 | ||
| with: | ||
| android: true | ||
| dotnet: true | ||
| haskell: true | ||
| large-packages: true | ||
|
|
||
| - uses: docker/setup-buildx-action@v1 | ||
|
|
||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build Cache for Docker | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: var-ccache | ||
| key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-deeploy | ||
|
|
||
| - name: Inject build-cache | ||
| uses: reproducible-containers/buildkit-cache-dance@v3.1.0 | ||
| with: | ||
| cache-map: | | ||
| { | ||
| "var-ccache": "/ccache" | ||
| } | ||
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: '${{ github.repository_owner }}' | ||
|
|
||
| - name: Build and push final deploy image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| platforms: linux/${{ matrix.platform }} | ||
| context: . | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=min | ||
| file: Container/Dockerfile.deeploy | ||
| push: true | ||
| build-args: | | ||
| BASE_IMAGE=${{ github.event.inputs.docker_image_toolchain }} | ||
| tags: | | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-${{ matrix.platform }} | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }} | ||
|
|
||
| merge-deeploy-images: | ||
| name: Merge Deeploy Images | ||
| runs-on: ubuntu-latest | ||
| needs: [ prepare, build-deeploy ] | ||
| steps: | ||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: '${{ github.repository_owner }}' | ||
|
|
||
| - uses: Noelware/docker-manifest-action@v1 | ||
| with: | ||
| inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-arm64 | ||
| tags: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }} | ||
| push: true | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| name: BuildDockerToolchain | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Fetch branch name or tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| docker_tag: ${{ steps.generate_tag.outputs.docker_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up environment variables | ||
| run: | | ||
| echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV | ||
|
|
||
| - name: Set Docker tag | ||
| id: generate_tag | ||
| run: | | ||
| if [[ "${{ env.IS_TAG }}" == "tag" ]]; then | ||
| echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| build-toolchain: | ||
| name: Build Deeploy Toolchain Image | ||
| needs: [ prepare ] | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: [amd64, arm64] | ||
| include: | ||
| - platform: amd64 | ||
| runner: ubuntu-latest | ||
| - platform: arm64 | ||
| runner: ubuntu-22.04-arm | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Free up disk space | ||
| uses: jlumbroso/free-disk-space@v1.3.1 | ||
| with: | ||
| android: true | ||
| dotnet: true | ||
| haskell: true | ||
| large-packages: true | ||
|
|
||
| - uses: docker/setup-buildx-action@v1 | ||
|
|
||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build Cache for Docker | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: var-ccache | ||
| key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-toolchain | ||
|
|
||
| - name: Inject build-cache | ||
| uses: reproducible-containers/buildkit-cache-dance@v3.1.0 | ||
| with: | ||
| cache-map: | | ||
| { | ||
| "var-ccache": "/ccache" | ||
| } | ||
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: '${{ github.repository_owner }}' | ||
|
|
||
| - name: Build and push toolchain image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| platforms: linux/${{ matrix.platform }} | ||
| context: . | ||
| file: Container/Dockerfile.toolchain | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-${{ matrix.platform }} | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }} | ||
|
|
||
| merge-toolchain-images: | ||
| name: Merge Deeploy Toolchain Images | ||
| runs-on: ubuntu-latest | ||
| needs: [ prepare, build-toolchain ] | ||
| steps: | ||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: '${{ github.repository_owner }}' | ||
|
|
||
| - uses: Noelware/docker-manifest-action@v1 | ||
| with: | ||
| inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-arm64 | ||
| tags: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }} | ||
| push: true |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.