Skip to content

Commit

Permalink
Newest actions/checkout persists git credentials automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
wingrunr21 committed Nov 3, 2019
1 parent 358c8cd commit ac8f693
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/update_formula.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ jobs:
bundle install --path .bundle
- name: Perform formula update
run: ruby util/update_formula.rb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions util/update_formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@

# Configure git
github_actor = ENV['GITHUB_ACTOR']
remote_url = "https://#{github_actor}:#{ENV['GITHUB_TOKEN']}@github.com/#{ENV['GITHUB_REPOSITORY']}.git"
git.config('user.name', github_actor)
git.config('user.email', "#{github_actor}@github.com")
git.add_remote('github', remote_url, fetch: true)

# Update new formula
git.add('Casks/xlights.rb')
git.commit("Update xLights to version #{version}")
git.add_tag(version, annotate: true, message: version)
git.push('github', 'master', tags: true)
git.push
end

0 comments on commit ac8f693

Please sign in to comment.