when: branch: master steps: build: image: alpine/git secrets: [ cbtoken ] commands: - git fetch --no-tags origin +refs/heads/master - git remote set-url origin "https://$${CBTOKEN}@git.slc.ar/slococo/calsais.git" - git config --local user.name "$(git log --format=%an | head -n 1)" - git config --local user.email "$(git log --format=%ae | head -n 1)" - shasum=$(sha256sum install.sh) - oldShasum=$(grep -oP "^[[:alnum:]]{64}" README.md) - if ! [ "$shasum" = "$oldShasum" ]; then sed -i "s/$oldShasum/$shasum/" README.md; fi - if [ -z "$(git status --porcelain)" ]; then exit 0; fi - git add README.md - git commit -m "Update sha256sum" - git push