Skip to content

Commit

Permalink
Update to use PAT to get around protected branches issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiefdhurst committed Dec 21, 2023
1 parent dc88982 commit 8953664
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ labels:
branches:
- name: main
protection:
required_pull_request_reviews: null
required_status_checks:
strict: true
contexts: ['Test']
enforce_admins: true
restrictions:
apps: []
users: []
teams: []
restrictions: null
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
permissions:
contents: write

env:
ACTIONS_STEP_DEBUG: true

jobs:
Build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,15 +42,22 @@ jobs:
cond: ${{ contains(steps.latest.outputs.name, '.') }}
if_true: ${{ steps.calculate.outputs.version }}
if_false: '0.0.1'
- name: Remove Leading "v" from Latest Version
if: ${{ contains(steps.latest.outputs.name, '.') }}
id: latest_clean
run: |
export version=$(echo ${{ steps.latest.outputs.name }} | sed 's/^v//')
echo ::set-output name=name::$version
- name: Update Version in Files
if: ${{ contains(steps.latest.outputs.name, '.') }}
uses: datamonsters/replace-action@v2
with:
files: 'journal.go,web/app/package.json'
replacements: '${{ steps.latest.output.name }}=${{ steps.version.outputs.value }}'
replacements: '${{ steps.latest_clean.outputs.name }}=${{ steps.version.outputs.value }}'
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update version to ${{ steps.version.outputs.value }}
commit_message: Update version to v${{ steps.version.outputs.value }}
token: ${{ secrets.PAT }}
- name: Docker Login
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
Expand Down

0 comments on commit 8953664

Please sign in to comment.