Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
actions: read

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
- name: Retrieve Secrets from Vault
id: vault
uses: hashicorp/vault-action@v3.4.0
Expand All @@ -41,16 +36,24 @@ jobs:
secret/data/github/automation-app-user GH_USER_NAME | GIT_COMMITTER_NAME ;
secret/data/github/automation-app-user GH_USER_EMAIL | GIT_COMMITTER_EMAIL ;

# - name: Get Automation Bot User ID
# id: get-user-id
# run: echo "user-id=$(gh api "/users/contentful-automation[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
# env:
# GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
token: ${{ steps.vault.outputs.GITHUB_TOKEN }}

- name: Get Automation Bot User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/contentful-automation[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
Comment thread
jjolton-contentful marked this conversation as resolved.

- name: Setting up Git User Credentials
run: |
git config --global user.name 'contentful-automation[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+contentful-automation[bot]@users.noreply.github.com'

# - name: Setting up Git User Credentials
# run: |
# git config --global user.name 'contentful-automation[bot]'
# git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+contentful-automation[bot]@users.noreply.github.com'
- name: Setup npmrc for publishing
run: |
echo "//npm.pkg.github.com/:_authToken=${{ steps.vault.outputs.GITHUB_PACKAGES_WRITE_TOKEN }}" > .npmrc
Expand Down