mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:15:50 +00:00
[add] Action for task b; push to main repo
This commit is contained in:
parent
856058c92d
commit
466cc92c52
1 changed files with 34 additions and 0 deletions
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Create and push docker image to Docker Hub.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout the code from main branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.9.0
|
||||
|
||||
-
|
||||
name: Build and push Docker images
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
push: true
|
||||
tags: user/main:action
|
||||
|
Loading…
Reference in a new issue