Skip to content

fix(ci): merge triggers (#70) #14

fix(ci): merge triggers (#70)

fix(ci): merge triggers (#70) #14

Workflow file for this run

name: Merge
on:
push:
branches: [main]
paths-ignore:
- '*.md'
- '.github/**'
- '.github/graphics/**'
- '!.github/workflows/**'
- 'renovate.json'
- 'target/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
vars:
name: Set Variables
outputs:
pr: ${{ steps.pr.outputs.pr }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps: # Get PR number for squash merges to main
- name: PR Number
id: pr
uses: bcgov-nr/[email protected]
semantic-release:
runs-on: ubuntu-22.04
needs: [vars]
outputs:
tag: ${{ steps.changelog.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Conventional Changelog Update
uses: TriPSs/conventional-changelog-action@v5
id: changelog
continue-on-error: true
with:
github-token: ${{ github.token }}
output-file: 'CHANGELOG.md'
skip-version-file: 'true'
skip-commit: 'true'
skip-on-empty: 'false'
git-push: 'true'
- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ steps.changelog.outputs.version != '' }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ github.token }}
with:
token: ${{ github.token }}
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Tag Docker Image for app container
uses: shrink/actions-docker-registry-tag@v4
if: ${{ steps.changelog.outputs.version != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service
target: ${{ needs.vars.outputs.pr }}
tags: ${{ steps.changelog.outputs.version }}
- name: Tag Docker Image for init container
uses: shrink/actions-docker-registry-tag@v4
if: ${{ steps.changelog.outputs.version != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service-init
target: ${{ needs.vars.outputs.pr }}
tags: ${{ steps.changelog.outputs.version }}
helm-release:
runs-on: ubuntu-22.04
needs: [semantic-release]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: package helm chart
shell: bash
run: |
helm package -u --destination=.cr-release-packages --app-version="${{ needs.semantic-release.outputs.tag }}" --version=${{ needs.semantic-release.outputs.tag }} charts/${{ github.event.repository.name }}
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
skip_packaging: 'true'