mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ci: tag image on push ghcr
Signed-off-by: Isma <71719097+Doozers@users.noreply.github.com>
This commit is contained in:
parent
01d50e278f
commit
5c783215b8
1 changed files with 19 additions and 1 deletions
20
.github/workflows/sync-and-build-plugins.yaml
vendored
20
.github/workflows/sync-and-build-plugins.yaml
vendored
|
|
@ -25,6 +25,24 @@ jobs:
|
|||
- name: "check if diff exists"
|
||||
id: diffcheck
|
||||
run: echo "stdout=$(git diff master geth/master -- | wc -c)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: "generate:build_id"
|
||||
run: |
|
||||
branch=${GITHUB_REF##*/}
|
||||
sha=${GITHUB_SHA::8}
|
||||
ts=$(date +%s)
|
||||
echo "BUILD_ID=${branch}-${sha}-${ts}" >> $GITHUB_ENV
|
||||
if: github.event_name == 'push'
|
||||
- name: "generate:build_id"
|
||||
run: |
|
||||
echo "BUILD_ID=${{ github.event.release.name }}" >> $GITHUB_ENV
|
||||
if: github.event_name == 'release'
|
||||
- name: "generate:build_id"
|
||||
run: |
|
||||
ts=$(date +%d%m%Y-%H%M%S)
|
||||
echo "BUILD_ID=auto-${ts}" >> $GITHUB_ENV
|
||||
if: github.event_name == 'schedule'
|
||||
|
||||
- name: "perform sync operations"
|
||||
if: steps.diffcheck.outputs.stdout != '0'
|
||||
run: |
|
||||
|
|
@ -35,7 +53,7 @@ jobs:
|
|||
git rebase --stat geth/master
|
||||
- name: "build the docker image to ensure project still builds"
|
||||
if: steps.diffcheck.outputs.stdout != '0'
|
||||
run: docker build -f Dockerfile.plugins . --tag ghcr.io/kilnfi/pgeth:latest --tag ghcr.io/kilnfi/pgeth:${GITHUB_SHA}
|
||||
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: "push rebased master branch"
|
||||
if: steps.diffcheck.outputs.stdout != '0'
|
||||
run: git push origin master --force
|
||||
|
|
|
|||
Loading…
Reference in a new issue