Skip to content

Commit

Permalink
👷 Add docker login
Browse files Browse the repository at this point in the history
  • Loading branch information
heavynimbus committed May 31, 2024
1 parent 7410c47 commit ab1ab6e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/upgrade-version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and Test

on:
release:
types:
- published
push:
branches:
- '*/*'
Expand All @@ -10,22 +13,40 @@ jobs:
runs-on: ubuntu-latest

permissions:
packages: write
contents: write

steps:
- name: Checkout
- 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: Commit and push
uses: stefanzweifel/git-auto-commit-action@v5
- name: Echo username
env:
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
run: echo "Username is ${USERNAME}"

- name: Docker Login
uses: docker/login-action@v3
with:
commit_message: "⬆️ Upgrade server version"
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

# - name: Upgrade server version
# run: |
# ./set-version.sh --pom server/pom.xml
#
# - name: Commit and push new version
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: "⬆️ Upgrade server version to $(./get-next-version.sh)"
#
# - name: Build docker image
# run: |
# docker build -t heavy-mock-http-server:$(./get-next-version.sh) server
3 changes: 3 additions & 0 deletions get-next-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

grep -rE 'version.next=[0-9]+\.[0-9]+\.[0-9]+' version.properties | cut -d '=' -f2
File renamed without changes.

0 comments on commit ab1ab6e

Please sign in to comment.