Skip to content

👷 Add docker login #19

👷 Add docker login

👷 Add docker login #19

Workflow file for this run

name: Upgrade Version and Deploy
on:
release:
types:
- published
push:
branches:
- '*/*'
jobs:
upgrade-version:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '21.0.3'
cache: 'maven'
cache-dependency-path: 'server/pom.xml'
- name: Upgrade server version
run: |
./set-version.sh --pom server/pom.xml
- name: Build Docker image
run: |
docker build -t heavy-mock-http-server:$(./get-next-version.sh) server
- name: Push Docker image
run: |
docker push heavy-mock-http-server:$(./get-next-version.sh)
- name: Commit and push new version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "⬆️ Upgrade server version to $(./get-next-version.sh)"