Skip to content

Commit

Permalink
Merge branch 'otterscan-develop-prev' into otterscan-develop; fix eri…
Browse files Browse the repository at this point in the history
  • Loading branch information
wmitsuda committed Oct 7, 2022
2 parents 6d8b304 + 5c71c2a commit 596fab8
Show file tree
Hide file tree
Showing 30 changed files with 2,502 additions and 398 deletions.
220 changes: 0 additions & 220 deletions .github/workflows/ci.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/coverage.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Publish Docker image

on:
push:
branches:
- "otterscan-develop"
- "setup-docker"
tags:
- "*-otterscan"

env:
IMAGE_NAME: ${{ github.repository }}

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # fetch git tags for "git describe"

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Docker Setup Buildx
uses: docker/[email protected]
with:
driver: docker-container
driver-opts: |
image=moby/buildkit:master
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker Metadata action
id: meta
uses: docker/[email protected]
with:
images: |
otterscan/erigon
ghcr.io/${{ env.IMAGE_NAME }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Loading

0 comments on commit 596fab8

Please sign in to comment.