Skip to content

Build and Push Docker Latest Image #1

Build and Push Docker Latest Image

Build and Push Docker Latest Image #1

Workflow file for this run

name: Build and Push Docker Latest Image
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 21
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build Docker image
run: docker build -t itning/yunshu-nas:latest .
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image to Docker Hub
run: docker push itning/yunshu-nas:latest