forked from prysmaticlabs/prysm
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (45 loc) · 1.69 KB
/
release.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
name: Release Suite
on:
push:
tags:
- v*
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
REPO_NAME: ${{ github.repository }}
IMAGE_NAME: ghcr.io/${{ github.repository }}
jobs:
extract-version:
runs-on: ubuntu-latest
steps:
- name: Extract version
run: echo "::set-output name=VERSION::$(echo ${GITHUB_REF#refs/tags/})"
id: extract_version
outputs:
VERSION: ${{ steps.extract_version.outputs.VERSION }}
build-docker:
runs-on: ubuntu-latest
needs: [extract-version]
# We need to enable experimental docker features in order to use `docker buildx`
env:
DOCKER_CLI_EXPERIMENTAL: enabled
VERSION: ${{ needs.extract-version.outputs.VERSION }}
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build beacon chain
run: bazel run //cmd/beacon-chain:image_bundle --config release
- name: Build validator
run: bazel run //cmd/validator:image_bundle --config release
- name: Docker tag and push
run: |
docker tag gcr.io/prysmaticlabs/prysm/beacon-chain:latest ${{ env.IMAGE_NAME }}-beacon-chain:${{ env.VERSION }}
docker tag gcr.io/prysmaticlabs/prysm/validator:latest ${{ env.IMAGE_NAME }}-validator:${{ env.VERSION }}
docker push ${{ env.IMAGE_NAME }}-beacon-chain:${{ env.VERSION }}
docker push ${{ env.IMAGE_NAME }}-validator:${{ env.VERSION }}