Split workflows

This commit is contained in:
Pedro Algarvio 2020-10-21 13:56:53 +01:00
parent dbd7a335af
commit 9f9d624bc8
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
2 changed files with 47 additions and 24 deletions

View file

@ -1,4 +1,4 @@
name: Checksums
name: Scripts-Checksums
on:
push:
@ -7,7 +7,7 @@ on:
jobs:
checksums:
name: Update Release Checksums
name: Update Scripts Checksums
runs-on: ubuntu-latest
steps:
@ -34,25 +34,3 @@ jobs:
with:
commit-message: Update sha256 checksums
delete-branch: true
- 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 }}
- name: Create Pull Request Against Develop
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update README.rst with latest release sha256sum
delete-branch: true

45
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Release
on:
push:
tags:
- '*'
jobs:
checksums:
name: Update Release Checksums on Develop
runs-on: ubuntu-latest
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 "BS_VERSION=$(sh bootstrap-salt.sh -v | awk '{ print $4 }')" >> $GITHUB_ENV
- 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 }}
- name: Create Pull Request Against Develop
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update README.rst with ${{ env.BS_VERSION }} release sha256sum
delete-branch: true