add compose and add secrets again

This commit is contained in:
Nikola 2025-01-05 21:47:23 +00:00
parent 0317a5bd4c
commit aadd77a460
2 changed files with 18 additions and 3 deletions

View file

@ -1,9 +1,12 @@
name: Build and Push Docker Image
# Adding a comment to trigger the workflow
on:
pull_request:
types: [closed]
branches:
- main
- master
labels:
- CI:Build
@ -24,8 +27,11 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PAT }}
- name: Set ENV Variable for Docker Compose
run: echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" >> $GITHUB_ENV
- name: Build and Push Docker Image
run: |
docker build -t nikolaivanovj/go-ethereum:latest .
docker push nikolaivanovj/go-ethereum:latest
docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest .
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest

9
.github/workflows/docker-compose.yml vendored Normal file
View file

@ -0,0 +1,9 @@
version: '3.8'
services:
geth:
image: "${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest"
ports:
- "8545:8545"
- "30303:30303"