Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixing tests on main #40

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading