Skip to content

Update main.yml

Update main.yml #23

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main # Trigger the workflow on pushes to the main branch
env:
DOCKER_IMAGE_NAME: ivanpiskunov/sectools # Replace with your details
DOCKER_TAG: ${{ github.sha }} # Use commit SHA as a tag, or latest for a fixed tag
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
# registry: https://hub.docker.com
username: ivanpiskunov # ${{ secrets.DOCKERHUB_USERNAME }}
password: $lMjW76CP#%94x@t # ${{ secrets.DOCKER_TOKEN }}
logout: true
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: . # Path to your Dockerfile, '.' for current directory
push: true
tags:

Check failure on line 36 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 36
${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_TAG }}
${{ env.DOCKER_IMAGE_NAME }}:latest # Optionally push with 'latest' tag
build-args: |
# Add any build arguments here, e.g., MY_ARG=value