This commit is contained in:
Pip 2024-07-02 23:26:51 +03:00
parent c6cae0f300
commit 8e80a7d05f

29
.github/workflows/ci-build.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: CI Build and Push to GitHub Container Registry
on:
pull_request:
types: [merged]
jobs:
build-and-push:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/go-ethereum:latest
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME