Skip to content

Commit

Permalink
actions: write updates directly to redirectLinks.json to main
Browse files Browse the repository at this point in the history
Closes #66
  • Loading branch information
flakey5 committed Nov 19, 2023
1 parent 95ec685 commit d74ee15
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/update-links.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Update Redirect Links

on:
# Triggered by https://github.com/nodejs/node/blob/main/.github/workflows/update-release-links.yml
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
Expand Down Expand Up @@ -31,15 +32,17 @@ jobs:
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}

- name: Open PR with updates
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update Redirect links
title: "chore: update redirect links"
body: |
This PR updates the links for url redirects.
branch: update-redirect-links
delete-branch: true
base: main

- name: Commit Changes
# Not sure if we need to define user.name and user.email in git config
run: |
git add src/constants/redirectLinks.json
git commit -m 'chore: update redirect links'
git push
- name: Deploy Worker to Production
run: |
gh workflow run deploy.yml
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}

0 comments on commit d74ee15

Please sign in to comment.