Skip to content

Commit

Permalink
Fixed some automated build procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
vesavlad committed May 8, 2024
1 parent 3801430 commit e897e55
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name: Java CI with Gradle

on:
push:
branches: [ "main", "v3" ]
branches: [ "main", "next" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next" ]

jobs:
build:
Expand All @@ -23,10 +23,10 @@ jobs:
- uses: actions/checkout@v3
name: Checkout

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand All @@ -37,18 +37,18 @@ jobs:
run: gradle clean build

container-image:
if: github.repository_owner == 'opentransportro' && github.event_name == 'push' && (github.ref == 'refs/heads/v3')
if: github.repository_owner == 'transittrack' && github.event_name == 'push'
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin
cache: gradle

Expand All @@ -57,13 +57,13 @@ jobs:

- name: Build container image with Jib, push to Dockerhub
env:
CONTAINER_REPO: docker.io/otrro/transitclock-server-v3
CONTAINER_REPO: ghcr.io/transittrack/transit-track
CONTAINER_REGISTRY_USER: ${{secrets.DOCKER_USER}}
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_AUTH }}
run: |
# we give the container two tags
# - "latest"
# - a string like "2.3_2022-12-12T21-38"
# - a string like "3.0_2022-12-12T21-38"
version_with_snapshot=`gradle properties -q | awk '/^version:/ {print $2}'`
version=${version_with_snapshot/-SNAPSHOT/}
Expand Down

0 comments on commit e897e55

Please sign in to comment.