calsais/.woodpecker.yml

20 lines
834 B
YAML

when:
branch: master
evaluate: 'not (CI_COMMIT_MESSAGE contains "Update sha256sum")'
steps:
- name: update
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)"
- sed -i "s/^[A-Za-z0-9]\{64\}/$(sha256sum install.sh | cut -d' ' -f1)/" README.md
- sed -i "s/[A-Za-z0-9]\{64\}/$(sha256sum packages.csv | cut -d' ' -f1)/" install.sh
- if [ -z "$(git status --porcelain)" ]; then exit 0; fi
- git add README.md install.sh
- git commit -m "Update sha256sum"
- git push --set-upstream origin master