Only update checksums on the main repo

This commit is contained in:
Pedro Algarvio 2020-10-19 17:47:52 +01:00
parent c7ddfb41ec
commit c5681cd7b7
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -12,21 +12,19 @@ jobs:
steps:
- uses: actions/checkout@v2
if: github.repository == 'saltstack/salt-bootstrap'
with:
ref: stable
- name: Get bootstrap-salt.sh sha256sum
if: github.repository == 'saltstack/salt-bootstrap'
run: |
echo "SH=$(sha256sum bootstrap-salt.sh | awk '{ print $1 }')" >> $GITHUB_ENV
echo "PS1=$(sha256sum bootstrap-salt.ps1 | awk '{ print $1 }')" >> $GITHUB_ENV
echo "BS_VERSION=$(sh bootstrap-salt.sh -v | awk '{ print $4 }')" >> $GITHUB_ENV
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Update Checksums
if: github.repository == 'saltstack/salt-bootstrap'
run: |
echo ${{ env.SH }} > bootstrap-salt.sh.sha256
echo ${{ env.PS1 }} > bootstrap-salt.ps1.sha256
@ -37,10 +35,18 @@ jobs:
git push
- uses: actions/checkout@v2
if: github.repository == 'saltstack/salt-bootstrap'
with:
ref: develop
- name: Set up Python 3.7
if: github.repository == 'saltstack/salt-bootstrap'
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Update Latest Release on README
if: github.repository == 'saltstack/salt-bootstrap'
run: |
python3 .github/workflows/scripts/update-release-shasum.py ${{ env.BS_VERSION }} ${{ env.SH }}
git config --global user.name 'SaltStack GH Automation'