Skip to content

Commit

Permalink
test action
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Feb 20, 2025
1 parent 1cdf064 commit 9e1ce11
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/update-sdk-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install GitHub CLI
run: |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh -y
- name: Authenticate GitHub CLI
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install Copilot CLI
run: |
npm install -g @githubnext/github-copilot-cli
gh extension install github/gh-copilot
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Copilot prompt
run: |
Expand All @@ -48,10 +42,10 @@ jobs:
- name: Use GitHub Copilot to update SDK example
run: |
github-copilot-cli suggest --prompt-file prompt.txt --file golang/sdk-example.go > golang/sdk-example.go.new
gh copilot suggest --prompt-file prompt.txt --file golang/sdk-example.go > golang/sdk-example.go.new
mv golang/sdk-example.go.new golang/sdk-example.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Format code
run: |
Expand Down

0 comments on commit 9e1ce11

Please sign in to comment.