-
Notifications
You must be signed in to change notification settings - Fork 241
chore: docker workflow refactor #2820
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 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ae4db56
chore: docker workflow refactor
auricom 4450668
factorize image tag
auricom ee4cf3d
permissions
auricom 11b9797
remove workflow dispatch
auricom 7c7fba0
docker job can only be called by ci_release workflow
auricom a8e26bf
permission
auricom 4f5f756
Potential fix for code scanning alert no. 145: Workflow does not contβ¦
auricom 6b740fd
tag
auricom fa932c4
permissions
auricom 8df4b4b
optim
auricom dfa9266
chore: reorg dockerfiles
auricom 15daa50
docker tags for apps
auricom dd4a854
release is not created
auricom 71ce4ca
docs
auricom 52a0c80
perm
auricom e9f72a8
Merge branch 'main' into claude/docker_rework
auricom db4c064
fix permissions
auricom ec03c9c
permissions
auricom 15799e8
fix readme
auricom 0baeed0
lint
auricom fe3dded
lint
auricom 89a8296
hadolint
auricom 3440dcb
lint
auricom 009ab68
lint
auricom af13741
release
auricom be661cb
hadolint
auricom 616347b
alpine 3.22.2
auricom 4cb7bbe
fix
auricom e95423b
fix
auricom a81ba54
fix
auricom b6bca3e
md
auricom 5d38f73
release
auricom 14f8f8d
Merge branch 'main' into claude/docker_rework
auricom 811e200
fix
auricom 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Docker E2E Tests workflow | ||
| # This workflow runs tests that require Docker images to be built first | ||
| name: Docker E2E Tests | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| image-tag: | ||
| required: true | ||
| type: string | ||
| workflow_dispatch: | ||
| inputs: | ||
| image-tag: | ||
| description: 'Docker image tag to use for tests (e.g., v1.2.3, pr-123, sha-abc123)' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| docker-tests: | ||
| name: Docker E2E Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: set up go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: ./test/docker-e2e/go.mod | ||
| - name: Run Docker E2E Tests | ||
| run: make test-docker-e2e | ||
| env: | ||
| EV_NODE_IMAGE_REPO: ghcr.io/${{ github.repository }} | ||
| EV_NODE_IMAGE_TAG: ${{ inputs.image-tag }} | ||
|
|
||
| docker-upgrade-tests: | ||
| name: Docker Upgrade E2E Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: set up go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: ./test/docker-e2e/go.mod | ||
| - name: Run Docker Upgrade E2E Tests | ||
| run: make test-docker-upgrade-e2e | ||
| env: | ||
| EVM_SINGLE_IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/ev-node-evm-single | ||
| EVM_SINGLE_NODE_IMAGE_TAG: ${{ inputs.image-tag }} | ||
|
||
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,75 @@ | ||
| # Docker Images Build workflow | ||
| # This workflow builds and pushes Docker images to GHCR | ||
| name: Build Docker Images | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| image-tag: | ||
| required: true | ||
| type: string | ||
| description: 'Docker image tag (e.g., v1.2.3, pr-123, sha-abc123)' | ||
| workflow_dispatch: | ||
| inputs: | ||
| image-tag: | ||
| description: 'Docker image tag to build (e.g., v1.2.3, sha-abc123)' | ||
| required: true | ||
| type: string | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| build-images: | ||
| name: Build ${{ matrix.image-name }} | ||
| # skip building images for merge groups as they are already built on PRs and main | ||
| if: github.event_name != 'merge_group' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: write | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - image-name: ev-node | ||
| dockerfile: Dockerfile | ||
| context: . | ||
| - image-name: ev-node-evm-single | ||
| dockerfile: apps/evm/single/Dockerfile | ||
| context: . | ||
| - image-name: local-da | ||
| dockerfile: da/cmd/local-da/Dockerfile | ||
| context: . | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Determine image tag | ||
| id: tag | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "release" ] || [ "${{ github.event_name }}" = "push" ]; then | ||
| echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
| elif [ "${{ github.event_name }}" = "pull_request" ]; then | ||
| echo "tag=pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "tag=${{ inputs.image-tag }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Build and push ${{ matrix.image-name }} Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: ${{ matrix.context }} | ||
| file: ${{ matrix.dockerfile }} | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.image-name }}:${{ steps.tag.outputs.tag }} |
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.
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.