Skip to content

Commit

Permalink
[Fix] Docker credentials in Github CI (#570)
Browse files Browse the repository at this point in the history
* docker credentials optional in bridge-ui-publish

* docker credentials optional in all-tools
  • Loading branch information
kyzooghost authored Jan 20, 2025
1 parent 734a2fd commit 6c8a282
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@ jobs:
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
IMAGE_NAME: consensys/linea-alltools
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
name: All tools build and push
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Login to Docker Hub
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
jobs:
publish:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -32,6 +35,7 @@ jobs:
run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV

- name: Login to Docker Repository
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -46,7 +50,7 @@ jobs:
with:
context: .
file: ./bridge-ui/Dockerfile
push: true
push: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
tags: consensys/linea-bridge-ui:${{ env.DOCKER_TAG }}
# Env file dedicated for dev
build-args: |
Expand Down

0 comments on commit 6c8a282

Please sign in to comment.