Merge pull request #1 from pumpncode/imgbot #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: replace bare import specifiers | |
on: | |
push: | |
branches: | |
- main | |
env: | |
SOURCE_BRANCH: main | |
NEW_BRANCH: url-imports | |
jobs: | |
replace: | |
runs-on: macos-11 | |
defaults: | |
run: | |
shell: zsh {0} | |
steps: | |
- name: set up brew | |
run: | | |
brew update | |
- name: set up git | |
run: | | |
brew install git | |
- name: checkout ${{ env.NEW_BRANCH }} | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ env.NEW_BRANCH }} | |
- name: import gpg key | |
uses: crazy-max/ghaction-import-gpg@v4 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_committer_email: 41898282+github-actions@users.noreply.github.com | |
git_committer_name: GitHub Actions | |
- name: set upstream | |
run: | | |
git branch -u origin/$NEW_BRANCH | |
- name: merge | |
run: | | |
git checkout $NEW_BRANCH | |
git merge -s ours origin/$SOURCE_BRANCH -m "chore: 🔀 merge $SOURCE_BRANCH into $NEW_BRANCH" | |
git checkout --detach origin/$SOURCE_BRANCH | |
git reset --soft $NEW_BRANCH | |
git checkout $NEW_BRANCH | |
git commit --amend -C HEAD | |
- name: set up deno | |
run: | | |
brew install deno | |
- name: replace bare import specifiers | |
run: | | |
deno run -A ./.github/workflows/replace-bare-import-specifiers.js | |
- name: stage files | |
run: | | |
git add --all --sparse | |
- name: commit | |
run: | | |
git commit -S --allow-empty -m "chore: 🚚 replace bare import specifiers" | |
- name: push | |
run: | | |
git push |