Skip to content

update github actions #4

update github actions

update github actions #4

Workflow file for this run

name: Main
on:
push:
branches:
- main
- jeremymv2/allow_any_job_image
permissions:
contents: write
jobs:
detect_changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
bump_app: ${{ steps.filter.outputs.bump_app }}
bump_helm: ${{ steps.filter.outputs.bump_helm }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
bump_app:
- 'cmd/**'
bump_helm:
- 'helm/**'
bump_build_push:
needs: detect_changes
if: needs.detect_changes.outputs.bump_app == 'true' || needs.detect_changes.outputs.bump_helm == 'true'
name: Bump Version(s)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: 'directory listing'
run: ls -l
- name: 'cat cmd/package.json'
run: cat cmd/package.json
- name: Bump Application version in package.json
if: needs.detect_changes.outputs.bump_app == 'true'
id: app-version-bump
uses: 'phips28/gh-action-bump-version@master'
with:
major-wording: 'major,breaking'
minor-wording: 'feat,minor'
patch-wording: 'fix,chore,test,docs,style,refactor,patch'
# defaulting to a patch bump.
rc-wording: 'RELEASE,alpha'
skip-commit: 'true'
skip-tag: 'true'
skip-push: 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PACKAGEJSON_DIR: 'cmd'
- name: 'cat cmd/package.json'
run: cat cmd/package.json
- name: 'Output Step'
env:
NEW_TAG: ${{ steps.app-version-bump.outputs.newTag }}
run: echo "new tag $NEW_TAG"