diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 00000000..d6260281 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,80 @@ +name: Docker + +on: + push: + branches: + - main + tags: + - "v*.*.*" + pull_request: + branches: + - main + workflow_dispatch: + inputs: + tags: + description: "Tags to build and push" + required: true + type: string + +permissions: + contents: read + packages: write + +jobs: + build-push: + runs-on: ubuntu-latest + + env: + DOCKER_REGISTRY: ghcr.io + DOCKER_IMAGE: osmosis-labs/meshd + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern={{version}},value=v${{ inputs.tags }},enable=${{ inputs.tags != '' }} + flavor: | + latest=false + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Run go vendor + run: | + cd demo/ && go mod vendor + + - name: Publish to GitHub Packages + uses: docker/build-push-action@v4 + with: + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max + context: demo/ diff --git a/demo/Dockerfile b/demo/Dockerfile index 0c7c5702..5ef4805d 100644 --- a/demo/Dockerfile +++ b/demo/Dockerfile @@ -30,11 +30,8 @@ FROM alpine:3.16 COPY --from=go-builder /code/build/meshd /usr/bin/meshd -# Set up dependencies used for Starship -ENV PACKAGES curl make bash jq sed - -# Install minimum necessary dependencies -RUN apk add --no-cache $PACKAGES +# Install dependencies used for Starship +RUN apk add --no-cache curl make bash jq sed WORKDIR /opt diff --git a/demo/go.mod b/demo/go.mod index 64e3f192..f4311e1a 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -3,7 +3,7 @@ module github.com/osmosis-labs/mesh-security-sdk/demo go 1.19 require ( - github.com/CosmWasm/wasmd v0.41.0-rc.3 + github.com/CosmWasm/wasmd v0.41.0 github.com/CosmWasm/wasmvm v1.3.0 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/cosmos-sdk v0.47.4 diff --git a/demo/go.sum b/demo/go.sum index ffeec4a2..24b70f3e 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -211,8 +211,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.41.0-rc.3 h1:0NRwC4dOO56GBV42niXvYlhyeZa8d5kEVEaUp6h4axg= -github.com/CosmWasm/wasmd v0.41.0-rc.3/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= +github.com/CosmWasm/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= +github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= github.com/CosmWasm/wasmvm v1.3.0 h1:x12X4bKlUPS7TT9QQP45+fJo2sp30GEbiSSgb9jsec8= github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= diff --git a/tests/e2e/go.mod b/tests/e2e/go.mod index c18e82fd..57d7d3f2 100644 --- a/tests/e2e/go.mod +++ b/tests/e2e/go.mod @@ -3,7 +3,7 @@ module github.com/osmosis-labs/mesh-security-sdk/tests/e2e go 1.19 require ( - github.com/CosmWasm/wasmd v0.41.0-rc.3 + github.com/CosmWasm/wasmd v0.41.0 github.com/CosmWasm/wasmvm v1.3.0 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/cosmos-sdk v0.47.4 diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index f613480a..ba68f353 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -211,8 +211,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.41.0-rc.3 h1:0NRwC4dOO56GBV42niXvYlhyeZa8d5kEVEaUp6h4axg= -github.com/CosmWasm/wasmd v0.41.0-rc.3/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= +github.com/CosmWasm/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= +github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= github.com/CosmWasm/wasmvm v1.3.0 h1:x12X4bKlUPS7TT9QQP45+fJo2sp30GEbiSSgb9jsec8= github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= diff --git a/x/go.mod b/x/go.mod index 29e4c56f..9235791c 100644 --- a/x/go.mod +++ b/x/go.mod @@ -3,7 +3,7 @@ module github.com/osmosis-labs/mesh-security-sdk/x go 1.19 require ( - github.com/CosmWasm/wasmd v0.41.0-rc.3 + github.com/CosmWasm/wasmd v0.41.0 github.com/CosmWasm/wasmvm v1.3.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/cosmos-sdk v0.47.4 diff --git a/x/go.sum b/x/go.sum index 70f5798d..7833b29f 100644 --- a/x/go.sum +++ b/x/go.sum @@ -211,8 +211,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.41.0-rc.3 h1:0NRwC4dOO56GBV42niXvYlhyeZa8d5kEVEaUp6h4axg= -github.com/CosmWasm/wasmd v0.41.0-rc.3/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= +github.com/CosmWasm/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= +github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= github.com/CosmWasm/wasmvm v1.3.0 h1:x12X4bKlUPS7TT9QQP45+fJo2sp30GEbiSSgb9jsec8= github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=