Skip to content

Commit 91a0262

Browse files
authored
fix: Improved version constraint key generation (#175)
1 parent b6caa5e commit 91a0262

File tree

3 files changed

+13
-28
lines changed

3 files changed

+13
-28
lines changed

.github/workflows/ci-export-requirements.yml

-7
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,3 @@ jobs:
2121
uses: stefanzweifel/git-auto-commit-action@v4
2222
with:
2323
commit_message: "build: Export updated requirements.txt"
24-
25-
- name: Push changes
26-
uses: ad-m/github-push-action@master
27-
with:
28-
branch: ${{ github.ref }}
29-
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
force: true

.github/workflows/ci-push-vc-key.yml

+12-20
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ jobs:
1010

1111
steps:
1212

13-
- name: Get alliteration char
13+
- name: Install petname
14+
shell: bash
1415
run: |
15-
echo "random_char=$(tr -dc 'a-z' < /dev/urandom | dd bs=1 count=1 2>/dev/null)" >> $GITHUB_ENV
16-
16+
sudo apt update
17+
sudo apt install petname -y
18+
1719
- name: Generate name
18-
id: generate-name
19-
uses: cyberbartels/random-pet@main
20-
with:
21-
alliteration: ${{ env.random_char }}
20+
shell: bash
21+
run: |
22+
echo "petname=$(petname --words 3 --complexity 0 --ubuntu)" >> $GITHUB_ENV
2223
2324
- name: Check result
2425
shell: bash
2526
run: |
26-
echo ${{ steps.generate-name.outputs.petname }}
27+
echo New version constraint key: ${{ env.petname }}
2728
2829
- name: Checkout
2930
uses: actions/checkout@v3
@@ -33,19 +34,10 @@ jobs:
3334
with:
3435
path: version_constraint_key
3536
contents: |
36-
${{ steps.generate-name.outputs.petname }}
37+
${{ env.petname }}
3738
write-mode: overwrite
3839

3940
- name: Commit files
40-
run: |
41-
git config --local user.email "[email protected]"
42-
git config --local user.name "Update VC-key Action"
43-
git add .
44-
git commit -m "refactor: Update version-constraint key"
45-
46-
- name: Push changes
47-
uses: ad-m/github-push-action@master
41+
uses: stefanzweifel/git-auto-commit-action@v4
4842
with:
49-
branch: ${{ github.ref }}
50-
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
force: true
43+
commit_message: "refactor: Update version_constraint_key"

version_constraint_key

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
famous-finch
1+
shortly-smooth-serval

0 commit comments

Comments
 (0)