forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from kilnfi/isma/pgeth-monitoring-env
fix: add build ci to ensure build at new push
- Loading branch information
Showing
2 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- "pgeth" | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
sync: | ||
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:latest | ||
docker push ghcr.io/kilnfi/pgeth:${GITHUB_SHA} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters