Skip to content

Added Continuous Delivery #1

Added Continuous Delivery

Added Continuous Delivery #1

Workflow file for this run

name: Delivery to Docker Hub
on:
pull_request:
branches: [ main ]
# push:
# branches: [ main ]
jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Spring project version
shell: bash -l {0}
run: echo project_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $APP_VERSION
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
target: final
tags: saneci/book-library:${{APP_VERSION}}

Check failure on line 37 in .github/workflows/docker-cd.yml

View workflow run for this annotation

GitHub Actions / Delivery to Docker Hub

Invalid workflow file

The workflow is not valid. .github/workflows/docker-cd.yml (Line: 37, Col: 17): Unrecognized named-value: 'APP_VERSION'. Located at position 1 within expression: APP_VERSION