Skip to content

Commit ca28af4

Browse files
committed
[fix] Environment variables
1 parent 0238635 commit ca28af4

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/release-on-semver-tag.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,5 @@ jobs:
7676
uses: ./.github/workflows/sync-to-wp-theme-2018-on-release.yml
7777
with:
7878
tag_name: ${{ github.event.inputs.tag_name }}
79+
secrets:
80+
ELEMENTS_PRIVATE_KEY: ${{ secrets.ELEMENTS }}

.github/workflows/sync-to-wp-theme-2018-on-release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@ on:
55
tag_name:
66
required: true
77
type: string
8+
secrets:
9+
ELEMENTS_PRIVATE_KEY:
10+
required: true
811

912
jobs:
1013
sync-to-wp-theme-2018:
11-
env:
12-
tag: ${{ inputs.tag_name }}
1314

1415
runs-on: ubuntu-latest
1516

1617
steps:
1718
- name: Setup SSH Key for wp-theme-2018
1819
run: |
1920
mkdir -p ~/.ssh
20-
echo "$ELEMENTS_PRIVATE_KEY" > ~/.ssh/id_rsa
21+
echo "${{ secrets.ELEMENTS_PRIVATE_KEY }}" > ~/.ssh/id_rsa
2122
chmod 600 ~/.ssh/id_rsa
2223
ssh-keyscan github.com >> ~/.ssh/known_hosts
23-
env: # Or as an environment variable
24-
ELEMENTS_PRIVATE_KEY: ${{ secrets.ELEMENTS }}
2524
2625
- name: Checkout elements
2726
uses: actions/checkout@v4
@@ -37,7 +36,7 @@ jobs:
3736
- name: Create new branch in wp-theme-2018
3837
run: |
3938
cd theme
40-
git checkout -b feature/update-from-elements-$tag
39+
git checkout -b feature/update-from-elements-${{ inputs.tag_name }}
4140
4241
- name: Copy CSS and JS files to wp-theme-2018
4342
run: |
@@ -61,5 +60,5 @@ jobs:
6160
echo "No changes to commit, skipping push."
6261
else
6362
git commit -m "New element version ${{ github.event.release.tag_name }}"
64-
git push --set-upstream origin feature/update-from-elements-$tag
63+
git push --set-upstream origin feature/update-from-elements-${{ inputs.tag_name }}
6564
fi

0 commit comments

Comments
 (0)