forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.01 KB
/
build.yaml
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
name: build
on:
push:
branches:
- "pgeth"
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "generate:build_id"
run: |
branch=${GITHUB_REF##*/}
sha=${GITHUB_SHA::8}
ts=$(date +%s)
echo "BUILD_ID=${branch}-${sha}-${ts}" >> $GITHUB_ENV
- name: "build the docker image"
run: docker build -f Dockerfile.plugins . --tag "ghcr.io/kilnfi/pgeth:${{ env.BUILD_ID }}" --tag ghcr.io/kilnfi/pgeth:latest --tag ghcr.io/kilnfi/pgeth:${GITHUB_SHA}
- name: "login to ghcr"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "push to ghcr"
run: |
docker push ghcr.io/kilnfi/pgeth:${{ env.BUILD_ID }}
docker push ghcr.io/kilnfi/pgeth:latest
docker push ghcr.io/kilnfi/pgeth:${GITHUB_SHA}