Some checks failed
CodeQL / Analyze (push) Waiting to run
Docker Build & Push Simapp (main) / docker-build (push) Waiting to run
golangci-lint / lint (push) Waiting to run
Tests / Code Coverage / build (amd64) (push) Waiting to run
Tests / Code Coverage / build (arm64) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[additional-args:-tags="test_e2e" name:e2e path:./e2e]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:08-wasm path:./modules/light-clients/08-wasm]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:ibc-go path:.]) (push) Waiting to run
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
Buf-Push / push (push) Has been cancelled
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: Docker Build & Push Simapp (main)
|
|
# Build & Push builds the simapp docker image on every push to main and
|
|
# and pushes the image to https://ghcr.io/cosmos/ibc-go-simd
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- release/v*
|
|
paths:
|
|
- '.github/workflows/docker.yml'
|
|
- '**.go'
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ibc-go-simd
|
|
|
|
jobs:
|
|
docker-build:
|
|
runs-on: depot-ubuntu-22.04-4
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Compute release branch tag
|
|
id: reltag
|
|
if: startsWith(github.ref_name, 'release/v')
|
|
shell: bash
|
|
run: |
|
|
RAW="${GITHUB_REF_NAME}"
|
|
SANITIZED="${RAW//\//-}"
|
|
echo "full_tag=${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }}:branch-${SANITIZED}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
build-args: |
|
|
IBC_GO_VERSION=${{ github.ref_name }}
|
|
|
|
- name: Test simd is runnable
|
|
run: |
|
|
docker run --rm ${{ steps.meta.outputs.tags }}
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ steps.meta.outputs.tags }}
|
|
${{ steps.reltag.outputs.full_tag }}
|
|
build-args: |
|
|
IBC_GO_VERSION=${{ github.ref_name }}
|