afa8bba099
Docker Hub personal account namespace must match the username. Updated all docker.io image references across workflows, actions, docker-compose files, and zombienet configs.
83 lines
2.7 KiB
YAML
83 lines
2.7 KiB
YAML
name: Build and push ETH-RPC image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
ETH_RPC_IMAGE_NAME: "docker.io/pezkuwi/eth-rpc"
|
|
|
|
jobs:
|
|
isdraft:
|
|
uses: ./.github/workflows/reusable-isdraft.yml
|
|
set-variables:
|
|
# This workaround sets the container image for each job using 'set-variables' job output.
|
|
# env variables don't work for PR from forks, so we need to use outputs.
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
outputs:
|
|
VERSION: ${{ steps.version.outputs.VERSION }}
|
|
steps:
|
|
- name: Define version
|
|
id: version
|
|
run: |
|
|
export COMMIT_SHA=${{ github.sha }}
|
|
export COMMIT_SHA_SHORT=${COMMIT_SHA:0:8}
|
|
export REF_NAME=${{ github.ref_name }}
|
|
export REF_SLUG=${REF_NAME//\//_}
|
|
VERSION=${REF_SLUG}-${COMMIT_SHA_SHORT}
|
|
echo "VERSION=${REF_SLUG}-${COMMIT_SHA_SHORT}" >> $GITHUB_OUTPUT
|
|
echo "set VERSION=${VERSION}"
|
|
|
|
build_docker:
|
|
name: Build docker images
|
|
runs-on: ubuntu-latest
|
|
needs: [set-variables]
|
|
env:
|
|
VERSION: ${{ needs.set-variables.outputs.VERSION }}
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Build eth-rpc Docker image
|
|
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
|
|
with:
|
|
context: .
|
|
file: ./bizinikiwi/pezframe/revive/rpc/dockerfiles/eth-rpc/Dockerfile
|
|
push: false
|
|
tags: |
|
|
${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }}
|
|
|
|
build_push_docker:
|
|
name: Build and push docker images
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
needs: [set-variables]
|
|
env:
|
|
VERSION: ${{ needs.set-variables.outputs.VERSION }}
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
|
with:
|
|
username: ${{ secrets.PEZKUWI_DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.PEZKUWI_DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Build eth-rpc Docker image
|
|
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
|
|
with:
|
|
context: .
|
|
file: ./bizinikiwi/pezframe/revive/rpc/dockerfiles/eth-rpc/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }}
|