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 14d8f1f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/upgrade-version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and Test
name: Upgrade Version and Deploy

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
with:
commit_message: "⬆️ Upgrade server version"
- name: Echo test
env:
TEST: ${{ secrets.test }}
run: echo "Username is $TEST"

# - name: Docker Login
# uses: docker/login-action@v3
# with:
# 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
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 14d8f1f

Please sign in to comment.