diff --git a/.github/workflows/update_formula.yaml b/.github/workflows/update_formula.yaml index be6634e..ace5be8 100644 --- a/.github/workflows/update_formula.yaml +++ b/.github/workflows/update_formula.yaml @@ -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 }} diff --git a/util/update_formula.rb b/util/update_formula.rb index a510b34..adbc3f0 100644 --- a/util/update_formula.rb +++ b/util/update_formula.rb @@ -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