Skip to content

Commit

Permalink
Reformat files and update token usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hwinther-tietoevry committed Oct 12, 2023
1 parent 1d3c1d1 commit d7099ca
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/enable-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: daneden/enable-automerge-action@v1
if: github.event.pull_request.user.login == 'dependabot[bot]'
with:
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
github-token: ${{ secrets.WORKFLOW_TOKEN }}
allowed-author: "dependabot[bot]"
# Allowed values: MERGE | SQUASH | REBASE
merge-method: REBASE
Expand All @@ -21,7 +21,7 @@ jobs:
uses: daneden/enable-automerge-action@v1
if: github.event.pull_request.user.login == 'github-actions[bot]'
with:
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
github-token: ${{ secrets.WORKFLOW_TOKEN }}
allowed-author: "github-actions[bot]"
# Allowed values: MERGE | SQUASH | REBASE
merge-method: MERGE
7 changes: 3 additions & 4 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 2 additions & 0 deletions .github/workflows/promotion-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
branch: test
title: Merging test changes to main
body: Automatically created pull-request in order to merge changes that were recently pushed to the test branch, back to main
Expand All @@ -46,6 +47,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
branch: dev
title: Merging dev changes to test
body: Automatically created pull-request in order to merge changes that were recently pushed to the dev branch, back to test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- main
push:
branches:
- main

jobs:
release-on-push:
Expand Down
50 changes: 24 additions & 26 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
on:
push:
branches:
- test
push:
branches:
- test

jobs:
tag-on-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # used by GitVersion to find the most recent tag outside of this branch
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # used by GitVersion to find the most recent tag outside of this branch

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch

- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ secrets.WORKFLOW_TOKEN }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.version.outputs.version }}',
sha: context.sha
})
- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ secrets.WORKFLOW_TOKEN }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.version.outputs.version }}',
sha: context.sha
})
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}

0 comments on commit d7099ca

Please sign in to comment.