Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
Added push to GitHub Container repositoriy.
  • Loading branch information
san-est authored Jun 11, 2024
1 parent b1ae96e commit 7103b5d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker image for project
name: Build & Push Docker image for project

on:
push:
Expand All @@ -8,12 +8,20 @@ on:

jobs:

build:
build-and-push:

runs-on: ubuntu-latest
if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'CI:Build') }}
steps:

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)

0 comments on commit 7103b5d

Please sign in to comment.