~havi/nvim.d

nvim.d/.build.yml -rw-r--r-- 1.4 KiB
3ccc6f82havi fix(nvim-tree): removed pinned commit and fixed viewing `.git*` files a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
image: alpine/edge
environment:
  REPO_NAME: "nvim.d"
  SOURCEHUT_USERNAME: "havi"
  GITHUB_USERNAME: "da-moon"
  GITHUB_EMAIL: "contact@havi.dev"
  SOURCEHUT_EMAIL: "contact@havi.dev"
secrets:
  - 911a32c9-a8b4-4d41-9fe0-18df25523b2f
sources:
  - https://git.sr.ht/~havi/nvim.d
tasks:
  - install-tools: |
      sudo apk add --no-cache "py3-pip" \
      && sudo python3 -m pip install "git-filter-repo"
  - validate-gh-fingerprint-and-config-ssh: |
      tmp_dir=$(mktemp -d -p $HOME)
      ssh-keyscan -t rsa github.com > $tmp_dir/github_host
      ssh-keygen -lf $tmp_dir/github_host > $tmp_dir/github_fingerprint
      grep -R "nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8" $tmp_dir/github_fingerprint
      cat $tmp_dir/github_host >> "${HOME}/.ssh/known_hosts"
      rm -rf $tmp_dir
      echo -e "Host github.com\n    IdentityFile ~/.ssh/id_rsa\n    IdentitiesOnly yes\n    BatchMode yes\n" >> "${HOME}/.ssh/config"
  - mirror-to-github: |
      cd "${HOME}/${REPO_NAME}" || exit 1 ;
      echo "${GITHUB_USERNAME} <${GITHUB_EMAIL}> ${SOURCEHUT_USERNAME}" > "${HOME}/mailmap" \
      && git remote add github "git@github.com:${GITHUB_USERNAME}/${REPO_NAME}" \
      && git config --local user.name "${GITHUB_USERNAME}" \
      && git config --local user.email "${GITHUB_EMAIL}" \
      && git filter-repo --force --mailmap "${HOME}/mailmap" \
      && git push --force --prune github +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/* "master"