docker-image.yml complete

This commit is contained in:
Kristian Hadzhikolev 2025-04-13 12:16:16 +03:00 committed by GitHub
parent 4f3423a6b9
commit dfbdf65bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,24 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag geth-assignment:$(date +%s)
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/get-etherium-assignment
tags: |
type=sha,format=long
type=ref,event=branch
latest
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max