Skip to content

Update docker-image.yml #3

Update docker-image.yml

Update docker-image.yml #3

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository}}
jobs:
build-and-push-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY}}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
push: true
tags:
- ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}

Check failure on line 35 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/docker-image.yml (Line: 35, Col: 9): A sequence was not expected
- ghcr.io/${{ env.IMAGE_NAME }}:latest
file: ./Dockerfile