Skip to content

Update maven.yml

Update maven.yml #25

Workflow file for this run

name: Build with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4.2.1
with:
java-version: '22.0.1'
distribution: 'oracle'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.4
- name: Build with Maven
run: mvn clean install
- name: Build & Push Docker Image
run: |

Check failure on line 31 in .github/workflows/maven.yml

View workflow run for this annotation

GitHub Actions / Build with Maven

Invalid workflow file

The workflow is not valid. .github/workflows/maven.yml (Line: 31, Col: 12): Unrecognized named-value: 'DOCKER_PASSWORD'. Located at position 1 within expression: DOCKER_PASSWORD
echo "${{ DOCKER_PASSWORD }}" | docker login -u "${{ DOCKER_USERNAME }}" --password-stdin
docker image build -t ${{ DOCKER_USERNAME }}/mongonext-backend:v1 .
docker push ${{ DOCKER_USERNAME }}/mongonext-backend:v1