Skip to content

Updated dependencies #28

Updated dependencies

Updated dependencies #28

name: 🧹 Remove ZeroPoint branding
on: [push]
jobs:
rebrand:
runs-on: ubuntu-latest
if: github.repository != 'MWDelaney/ZeroPoint'
steps:
- name: Get current branch name
run: |
echo "branch=$(echo '${{ github.ref }}' | awk -F '/' '{print $3}')" >> $GITHUB_OUTPUT
shell: bash
id: getBranch
- name: Get to the owner of this repository
run: echo "owner=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_OUTPUT
shell: bash
id: getOwner
- name: Get the repository name and convert it to lowercase
run: echo "slug=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
shell: bash
id: getSlug
- name: Get the repository name
run: echo "name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
shell: bash
id: getName
- name: Checkout the repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ steps.getBranch.outputs.branch }}
- name: Replace owner
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "MWDelaney"
replace: ${{ steps.getOwner.outputs.owner }}
regex: false
- name: Replace repository name
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "ZeroPoint"
replace: ${{ steps.getSlug.outputs.slug }}
regex: false
- name: Replace repository slug
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "zeropoint"
replace: ${{ steps.getName.outputs.name }}
regex: false
- name: Archive template README.md
uses: canastro/copy-file-action@master
with:
source: "README.md"
target: "README.template.md"
- name: Replace with project README.md
uses: canastro/copy-file-action@master
with:
source: "README.ZeroPoint.md"
target: "README.md"
- name: Commit changes and delete this workflow
uses: EndBug/add-and-commit@v9
with:
remove: '["./.github/workflows/zeropoint-template.yml", "./README.ZeroPoint.md"]'
message: "Up to zero 🪐"
tag: 'v1.0.0 --force'