Skip to content

Commit

Permalink
fix: fixing tests on main (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Jul 2, 2024
1 parent c36dda6 commit 289b950
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
41 changes: 27 additions & 14 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,34 @@ concurrency:
cancel-in-progress: true

jobs:
vars:
name: Variables
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.semver.outputs.version }}
tag: ${{ steps.semver.outputs.tag }}
steps:
# steps.semver.outputs.tag => needs.vars.outputs.semver
- uses: actions/checkout@v4
with:
ref: refs/heads/${{ github.event.repository.default_branch }}
- name: Conventional Changelog Update
uses: TriPSs/[email protected]
id: semver
with:
git-branch: refs/heads/${{ github.head_ref }}
git-push: 'false'
skip-commit: 'true'
skip-on-empty: 'false'
skip-version-file: 'true'

- run: |
echo "semver=${{ steps.semver.outputs.version }}"
echo "tag=${{ steps.semver.outputs.tag }}"
cleanup-jars:
name: Cleanup Dev Images
runs-on: ubuntu-22.04
needs: [vars]
env:
NAME: ${{ github.event.repository.name }}
steps:
Expand All @@ -38,7 +63,7 @@ jobs:
token: ${{ secrets.PAT }}
type: maven
name: ca.bc.gov.nrs-commons.forest-client-core
version: ${{ steps.changelog.outputs.version }}.PR${{ github.event.number }}
version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }}
user: ${{ github.repository_owner }}

- name: Removing dev spring
Expand All @@ -48,17 +73,5 @@ jobs:
token: ${{ secrets.PAT }}
type: maven
name: ca.bc.gov.nrs-commons.forest-client-spring
version: ${{ steps.changelog.outputs.version }}.PR${{ github.event.number }}
version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }}
user: ${{ github.repository_owner }}

image-promotions:
name: Image Promotions
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-22.04
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/certextractor
target: ${{ github.event.number }}
tags: prod
11 changes: 9 additions & 2 deletions .github/workflows/reusable-tests-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,15 @@ jobs:

- name: Build Spring
if: github.event_name != 'pull_request'
working-directory: spring
run: mvn clean package -Dcore.version=${{ needs.vars.outputs.semver }}
uses: nick-fields/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 10
retry_wait_seconds: 90
command: |
cd spring
mvn clean package -Dcore.version=${{ needs.vars.outputs.semver }}
- name: Build Spring
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 289b950

Please sign in to comment.