Skip to content

Update docker-publish.yml #3

Update docker-publish.yml

Update docker-publish.yml #3

name: Docker
on:
push:
branches: [ "master" ]
env:
NAMESPACE: ghcr.io/ethereum/sourcify
IMAGE_NAME: ghcr.io/ethereum/sourcify/stats-gen
GITHUB_CR_PAT: ${{ secrets.CR_PAT }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into registry ${{ env.NAMESPACE }}
run: echo ${{ env.GITHUB_CR_PAT }} | docker login ghcr.io --username kuzdogan --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max