mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
added workflow
This commit is contained in:
parent
23973bd3a0
commit
9b7223cea5
1 changed files with 37 additions and 0 deletions
37
.github/workflows/ci-build.yml
vendored
Normal file
37
.github/workflows/ci-build.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
labels:
|
||||||
|
- 'CI:Build'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: |
|
||||||
|
docker build -t dzivdzi/go-ethereum:${{ github.sha }} .
|
||||||
|
docker tag dzivdzi/go-ethereum:${{ github.sha }} dzivdzi/go-ethereum:latest
|
||||||
|
|
||||||
|
- name: Push the Docker image
|
||||||
|
run: |
|
||||||
|
docker push dzivdzi/go-ethereum:${{ github.sha }}
|
||||||
|
docker push dzivdzi/go-ethereum:latest
|
||||||
Loading…
Reference in a new issue