Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new dockerfile #23

Merged
merged 7 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
54 changes: 12 additions & 42 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,26 @@
# This workflow builds and pushes a new version of the build container image
# when the tools directory changes on master. Edit tools/Dockerfile.
#
# This workflow does not push a new image until it is merged, so tests that
# depend on changes in this image will not pass until this workflow succeeds.
# For that reason, changes here should be done in a separate PR in advance of
# work that depends on them.
name: build docker image

name: Build & Push TM-DB-Testing
on:
pull_request:
paths:
- "tools/*"
workflow_dispatch:
push:
branches:
- master
paths:
- "tools/*"
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=tendermintdev/docker-tm-db-testing
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
VERSION=latest
fi
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
echo ::set-output name=tags::${TAGS}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout
uses: actions/checkout@v3

- name: Login to DockerHub
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v3
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./tools
file: ./tools/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
tags: ghcr.io/cosmos/cosmos-db/build-test:latest
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file makes a development and test environment that includes the latest versions of relevant databases.

FROM archlinux

RUN pacman -Syyu --noconfirm go base-devel rocksdb leveldb
44 changes: 0 additions & 44 deletions tools/Dockerfile

This file was deleted.