Skip to content

Update main.yml

Update main.yml #9

Workflow file for this run

name: build and dockerize the application
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Build
run: go build -v .
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and release to DockerHub
with:
context: .
env:
NAME: knightchaser # DockerHub account name
REPO: goanonpicdb-aws # DockerHub repository name
run: |

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

View workflow run for this annotation

GitHub Actions / build and dockerize the application

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 32, Col: 9): Unexpected value 'run' .github/workflows/main.yml (Line: 26, Col: 9): Required property is missing: uses
docker build --tag $REPO ./Dockerfile
docker tag $REPO:latest $NAME/$REPO:latest
docker push $NAME/$REPO:latest