Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/mmr-polkadot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "mmr-polkadot Docker image"

on:
workflow_dispatch:
push:
branches:
- mmr-polkadot

env:
DOCKER_USER_OPTION: '$UID:$GID'
SCCACHE_GCS_BUCKET: 'composable-build-artefacts'
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache"
SCCACHE_GCS_RW_MODE: "READ_WRITE"

jobs:
build-and-publish:
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: true

steps:
- name: Clean up
continue-on-error: true
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
docker system prune --force --all --volumes

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build Docker image
run: make containerize-mmr-polkadot

- name: Docker push
run: make push-mmr-polkadot
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ push-composable-sandbox:
@docker push ${REPO}/composable-sandbox:${COMMIT_SHA}
@docker push ${REPO}/composable-sandbox:latest

containerize-mmr-polkadot:
@docker build -f docker/mmr-polkadot.dockerfile \
-t ${REPO}/mmr-polkadot:latest \
.

push-mmr-polkadot:
@docker push ${REPO}/mmr-polkadot:latest

containerize-ci-linux:
@docker build -f docker/ci-linux.dockerfile \
-t ${REPO}/ci-linux:production \
Expand All @@ -107,7 +115,8 @@ endif


.PHONY: build test docs style-check lint udeps containerize dev push install stop containerize-release push-release
.PHONY: containerize-composable-sandbox push-composable-sandbox containerize-ci-linux push-ci-linux
.PHONY: containerize-composable-sandbox push-composable-sandbox containerize-mmr-polkadot push-mmr-polkadot
.PHONY: containerize-ci-linux push-ci-linux

#----------------------------------------------------------------------
# UTILITY FUNCTIONS TO remove
Expand Down
7 changes: 7 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ docker run --rm -ti -u$(id -u):$(id -g) -p9944:9944 -p9988:9988 -p9998:9998 comp
'''
workspace = false

[tasks.remove-composable-sandbox-image]
dependencies = []
script = '''
docker rmi composablefi/composable-sandbox:latest
'''
workspace = false

[tasks.run-local-integration-tests]
script = '''
# we cannot use toolchain setting as different parts of codebase require different compiler
Expand Down
2 changes: 1 addition & 1 deletion docker/composable-sandbox.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils ca-ce

# ===== SECOND STAGE ======

FROM andor/mmr-polkadot:v0.9.17 as mmr-polkadot
FROM composablefi/mmr-polkadot:latest as mmr-polkadot

FROM debian:11-slim

Expand Down
File renamed without changes.