Skip to content

Update docker-image.yml #5

Update docker-image.yml

Update docker-image.yml #5

Workflow file for this run

name: Build & Push Docker image for project
on:
push:
types: [labeled]
pull_request:
types: [labeled]
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'CI:Build') }}
steps:
- uses: actions/checkout@v4
- name: Login to Github Container repository
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag go-etherium-devops:$(date +%s)
- name: Push Docker image to Github container repository
run: docker push ghcr.io/go-etherium-devops:$(date +%s)