Skip to content

Commit

Permalink
Merge pull request #102 from kartoza/artifacts
Browse files Browse the repository at this point in the history
Update deployment file
  • Loading branch information
NyakudyaA authored Oct 21, 2024
2 parents 3402b14 + 29e1c39 commit 0a6c966
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
file: Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}
${{ secrets.DOCKERHUB_REPO }}/pg-backup
${{ steps.check_hub_image_exists.outputs.check_image == 200 && format('{0}/pg-backup:{1}-{2}.{3}', secrets.DOCKERHUB_REPO, matrix.postgresMajorVersion, matrix.postgisMajorVersion, matrix.postgisMinorRelease) || null}}
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}--v${{ steps.current_date.outputs.formatted }}
build-args: |
Expand All @@ -72,3 +72,42 @@ jobs:
type=gha,scope=prod
cache-to: type=gha,scope=prod
target: postgis-backup-production

publish_release_artifacts:
runs-on: ubuntu-latest
timeout-minutes: 5
if: |
github.actor != 'dependabot[bot]' &&
!(
contains(github.event.pull_request.title, '[skip-release]') ||
contains(github.event.comment.body, '/skiprelease')
) && github.event.workflow_run.conclusion == 'success'
needs: [ deploy-image ]
strategy:
matrix:
geoserverMajorVersion:
- 2
geoserverMinorVersion:
- minor: 26
patch: 2
steps:
- name: Checkout code
id: git_checkout
uses: actions/checkout@v3
with:
ref: 'master'

- name: Get Current Date
id: current_date
run: echo "formatted=$(date -u +%Y.%m.%d)" >> $GITHUB_OUTPUT

- name: Get Latest Commit Hash
id: latest_commit_hash
run: echo "commit=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT

- name: publish_release
id: tag_releases
run: |
gh release create v${{ matrix.postgresMajorVersion }}.${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}--v${{ steps.current_date.outputs.formatted }}--${{ steps.latest_commit_hash.outputs.commit }} --notes ${{ steps.latest_commit_hash.outputs.commit }} --target master --repo $GITHUB_REPOSITORY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0a6c966

Please sign in to comment.