Skip to content

Commit 116b5d8

Browse files
committed
chore: putting vault access back in
1 parent 23b0575 commit 116b5d8

2 files changed

Lines changed: 39 additions & 40 deletions

File tree

.github/workflows/main.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
needs: build
1515
uses: ./.github/workflows/check.yaml
1616

17-
# Skipping for now as demo projects aren't currently running in GHA
1817
test-demo-projects:
1918
needs: [build, check]
2019
uses: ./.github/workflows/test-demo-projects.yaml
@@ -33,5 +32,5 @@ jobs:
3332
id-token: write
3433
actions: read
3534
uses: ./.github/workflows/release.yaml
36-
# secrets:
37-
# VAULT_URL: ${{ secrets.VAULT_URL }}
35+
secrets:
36+
VAULT_URL: ${{ secrets.VAULT_URL }}

.github/workflows/release.yaml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Release
22

33
on:
44
workflow_call:
5-
# secrets:
6-
# VAULT_URL:
7-
# required: true
5+
secrets:
6+
VAULT_URL:
7+
required: true
88

99
jobs:
1010
release:
@@ -16,28 +16,28 @@ jobs:
1616
actions: read
1717

1818
steps:
19-
# - name: 'Retrieve Secrets from Vault'
20-
# id: vault
21-
# uses: hashicorp/vault-action@v3.4.0
22-
# with:
23-
# url: ${{ secrets.VAULT_URL }}
24-
# role: ${{ github.event.repository.name }}-github-action
25-
# method: jwt
26-
# path: github-actions
27-
# exportEnv: false
28-
# secrets: |
29-
# github/token/${{ github.event.repository.name }}-semantic-release token | GITHUB_TOKEN;
19+
- name: 'Retrieve Secrets from Vault'
20+
id: vault
21+
uses: hashicorp/vault-action@v3.4.0
22+
with:
23+
url: ${{ secrets.VAULT_URL }}
24+
role: ${{ github.event.repository.name }}-github-action
25+
method: jwt
26+
path: github-actions
27+
exportEnv: false
28+
secrets: |
29+
github/token/${{ github.event.repository.name }}-semantic-release token | GITHUB_TOKEN;
3030
31-
# - name: Get Automation Bot User ID
32-
# id: get-user-id
33-
# run: echo "user-id=$(gh api "/users/contentful-automation[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
34-
# env:
35-
# GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
31+
- name: Get Automation Bot User ID
32+
id: get-user-id
33+
run: echo "user-id=$(gh api "/users/contentful-automation[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
34+
env:
35+
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
3636

37-
# - name: Setting up Git User Credentials
38-
# run: |
39-
# git config --global user.name 'contentful-automation[bot]'
40-
# git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+contentful-automation[bot]@users.noreply.github.com'
37+
- name: Setting up Git User Credentials
38+
run: |
39+
git config --global user.name 'contentful-automation[bot]'
40+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+contentful-automation[bot]@users.noreply.github.com'
4141
4242
- name: Checkout code
4343
uses: actions/checkout@v5
@@ -71,18 +71,18 @@ jobs:
7171
env:
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373

74-
# - name: Get latest release tag
75-
# id: get-tag
76-
# run: |
77-
# TAG=$(gh api repos/${{ github.repository }}/releases/latest --jq .tag_name)
78-
# echo "tag=$TAG" >> $GITHUB_OUTPUT
79-
# env:
80-
# GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
74+
- name: Get latest release tag
75+
id: get-tag
76+
run: |
77+
TAG=$(gh api repos/${{ github.repository }}/releases/latest --jq .tag_name)
78+
echo "tag=$TAG" >> $GITHUB_OUTPUT
79+
env:
80+
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
8181

82-
# - name: Summary
83-
# run: |
84-
# VERSION=$(echo "${{ steps.get-tag.outputs.tag }}" | sed 's/^v//')
85-
# echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
86-
# echo "" >> $GITHUB_STEP_SUMMARY
87-
# echo "- **Version**: ${{ steps.get-tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
88-
# echo "- **GitHub Release**: https://github.com/${{ github.repository }}/releases/tag/${{ steps.get-tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
82+
- name: Summary
83+
run: |
84+
VERSION=$(echo "${{ steps.get-tag.outputs.tag }}" | sed 's/^v//')
85+
echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
86+
echo "" >> $GITHUB_STEP_SUMMARY
87+
echo "- **Version**: ${{ steps.get-tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
88+
echo "- **GitHub Release**: https://github.com/${{ github.repository }}/releases/tag/${{ steps.get-tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)