Skip to content

Commit

Permalink
Github Actions: Fix permission issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fuma-nama committed Jan 6, 2024
1 parent 6a4c322 commit 85f1d13
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4

- uses: pnpm/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
token: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }}

- uses: pnpm/[email protected]
with:
Expand All @@ -34,6 +35,5 @@ jobs:
publish: pnpm run release
version: pnpm run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }}
10 changes: 0 additions & 10 deletions packages/create-next-docs/scripts/update-git-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ get_abs_filename() {
DIR=$(get_abs_filename $(dirname "$0"))
TMP=$(get_abs_filename "$DIR/../node_modules/.tmp")

if [ "$CI" ]; then
(umask 0077; echo "$UPDATE_TEMPLATE_SSH_KEY" > ~/ssh_key;)
export GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key'
fi

mkdir -p $TMP
cd $TMP

Expand All @@ -25,11 +20,6 @@ git clone --depth 1 --single-branch --branch main https://github.com/fuma-nama/n
cd next-docs-ui-template
node $DIR/update-git-repo.js $TMP/next-docs-ui-template

if [ "$CI" ]; then
git config user.email '[email protected]'
git config user.name '[bot]'
fi

# commit the new files
git add -A
git commit -m "version $npm_package_version"
Expand Down

0 comments on commit 85f1d13

Please sign in to comment.