forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 2.06 KB
/
build-nethtest-hive-docker-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: '[BUILD] Nethtest/Hive images and publisg them to Docker Hub'
on:
push:
branches:
- master
jobs:
build-secondary-dockers:
if: github.repository_owner == 'NethermindEth'
runs-on: ubuntu-latest
steps:
- name: Import Secrets
uses: hashicorp/vault-action@v2.1.2
with:
url: ${{ secrets.VAULT_URL }}
method: approle
roleId: ${{ secrets.ROLE_ID }}
secretId: ${{ secrets.SECRET_ID }}
namespace: admin/NethermindEth
secrets: |
github/nethermind/data/environments/release DOCKER_USERNAME ;
github/nethermind/data/environments/release DOCKER_PASSWORD
- name: Checking out repository
uses: actions/checkout@v2
- name: Unshallow fetching
run: git fetch --unshallow
- name: Settings
id: settings
run: |
echo ::set-output name=docker_username::${{ env.DOCKER_USERNAME }}
echo ::set-output name=docker_image_nethtest::nethermindeth/nethtest
echo ::set-output name=docker_image_hive::nethermindeth/hive
- name: Setting up QEMU
uses: docker/setup-qemu-action@v1
- name: Setting up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Logging to Docker Hub
if: success()
env:
DOCKER_PASSWORD: ${{ env.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ steps.settings.outputs.docker_username }}" --password-stdin
- name: Building & Pushing image to docker registry
run: |
docker buildx build --platform=linux/amd64 -t "${{ steps.settings.outputs.docker_image_nethtest }}" -f Dockerfile.stateRunner --build-arg GIT_COMMIT=$(git log -1 --format=%h) . --push
docker buildx build --platform=linux/amd64 -t "${{ steps.settings.outputs.docker_image_hive }}:latest" -f Dockerfile --build-arg GIT_COMMIT=$(git log -1 --format=%h) . --push
- name: Clearing
if: always()
run: |
rm -f ${HOME}/.docker/config.json