-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add workflow for git sha container builds (#11721)
- Loading branch information
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,44 @@ | ||
# Publishes the Docker image, only to be used with `workflow_dispatch`. The | ||
# images from this workflow will be tagged with the git sha of the branch used | ||
# and will NOT tag it as `latest`. | ||
|
||
name: docker-git | ||
|
||
on: | ||
workflow_dispatch: {} | ||
|
||
env: | ||
REPO_NAME: ${{ github.repository_owner }}/reth | ||
IMAGE_NAME: ${{ github.repository_owner }}/reth | ||
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth | ||
CARGO_TERM_COLOR: always | ||
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth | ||
OP_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/op-reth | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
GIT_SHA: ${{ github.sha }} | ||
|
||
jobs: | ||
build: | ||
name: build and push | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- uses: taiki-e/install-action@cross | ||
- name: Log in to Docker | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin | ||
- name: Set up Docker builder | ||
run: | | ||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64 | ||
docker buildx create --use --name cross-builder | ||
- name: Build and push the git-sha-tagged reth image | ||
run: make PROFILE=maxperf GIT_SHA=$GIT_SHA docker-build-push-git-sha | ||
- name: Build and push the git-sha-tagged op-reth image | ||
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME GIT_SHA=$GIT_SHA PROFILE=maxperf op-docker-build-push-git-sha |
This file contains 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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
name: docker | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
tags: | ||
- v* | ||
|
This file contains 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