Skip to content

Create docker-publish.yml #1

Create docker-publish.yml

Create docker-publish.yml #1

name: Docker
on:
push:
branches: [ "master" ]
env:
NAMESPACE: ghcr.io/ethereum/sourcify
IMAGE_NAME: ${{ env.NAMESPACE }}/stats-gen

Check failure on line 9 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 9, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.NAMESPACE
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