Skip to content

fixing

fixing #12

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
#adding this so that I can test my jovs and run workflows manually from the Actions tab in the repository
workflow_dispatch:
env:
REGISTRY: https://ghcr.io
IMAGE_NAME: san-est/gk-webapp
IMAGE:TAG: $(date +%s)
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Login to registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/san-est/gk-webapp:latest
run: docker push ghcr.io/san-est/gk-webapp:latest

Check failure on line 39 in .github/workflows/build-and-push-dockerimage.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/build-and-push-dockerimage.yml (Line: 39, Col: 7): 'run' is already defined