Skip to content

Commit

Permalink
feat: add arm support (#7946) (#7953)
Browse files Browse the repository at this point in the history
(cherry picked from commit 13c58fa)

Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com>
  • Loading branch information
mergify[bot] and niccoloraspa authored Apr 4, 2024
1 parent 07707f1 commit ffa99ca
Showing 1 changed file with 82 additions and 10 deletions.
92 changes: 82 additions & 10 deletions .github/workflows/push-dev-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,44 @@ env:
OSMOSIS_INIT_CHAIN_IMAGE_REPOSITORY: osmolabs/osmosis-e2e-init-chain

jobs:
docker:
push-docker-images:
runs-on: buildjet-2vcpu-ubuntu-2204
steps:
- name: Check out repo
-
name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Find go version
-
name: Find go version
run: |
GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2)
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV
- name: Create Docker Image Tag for release candidate
-
name: Create Docker Image Tag for release candidate
if: startsWith(github.ref, 'refs/tags/v')
run: |
GITHUB_TAG=${{ github.ref_name }}
echo "DOCKER_IMAGE_TAG=${GITHUB_TAG#v}" >> $GITHUB_ENV
echo "OSMOSIS_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Create Docker Image Tag for vN.x branch
-
name: Create Docker Image Tag for vN.x branch
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)
echo "DOCKER_IMAGE_TAG=${{ github.ref_name }}-${SHORT_SHA}-$(date +%s)" >> $GITHUB_ENV
echo "OSMOSIS_VERSION=${{ github.ref_name }}-$SHORT_SHA" >> $GITHUB_ENV
- name: Build and Push Docker Images
-
name: Build and Push Docker Images
uses: docker/build-push-action@v5
with:
file: Dockerfile
Expand All @@ -72,13 +79,78 @@ jobs:
GIT_COMMIT=${{ github.sha }}
tags: |
${{ env.OSMOSIS_DEV_IMAGE_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}
- name: Build and Push E2E Init Docker Images
-
name: Build and Push E2E Init Docker Images
uses: docker/build-push-action@v5
with:
file: tests/e2e/initialization/init.Dockerfile
context: .
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
build-args: |
E2E_SCRIPT_NAME=chain
tags: |
${{ env.OSMOSIS_INIT_CHAIN_IMAGE_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}
push-docker-images-arm:
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
-
name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Find go version
run: |
GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2)
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV
-
name: Create Docker Image Tag for release candidate
if: startsWith(github.ref, 'refs/tags/v')
run: |
GITHUB_TAG=${{ github.ref_name }}
echo "DOCKER_IMAGE_TAG=${GITHUB_TAG#v}" >> $GITHUB_ENV
echo "OSMOSIS_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
-
name: Create Docker Image Tag for vN.x branch
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)
echo "DOCKER_IMAGE_TAG=${{ github.ref_name }}-${SHORT_SHA}-$(date +%s)" >> $GITHUB_ENV
echo "OSMOSIS_VERSION=${{ github.ref_name }}-$SHORT_SHA" >> $GITHUB_ENV
-
name: Build and Push Docker Images
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
push: true
platforms: linux/arm64
build-args: |
GO_VERSION=${{ env.GO_VERSION }}
RUNNER_IMAGE=${{ env.RUNNER_BASE_IMAGE_ALPINE }}
GIT_VERSION=${{ env.OSMOSIS_VERSION }}
GIT_COMMIT=${{ github.sha }}
tags: |
${{ env.OSMOSIS_DEV_IMAGE_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}
-
name: Build and Push E2E Init Docker Images
uses: docker/build-push-action@v5
with:
file: tests/e2e/initialization/init.Dockerfile
context: .
push: true
platforms: linux/arm64
build-args: |
E2E_SCRIPT_NAME=chain
tags: |
Expand Down

0 comments on commit ffa99ca

Please sign in to comment.