Skip to content

Commit

Permalink
Update schedule.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
vitodb authored Jan 8, 2022
1 parent 9d7b41a commit c7fa638
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
name: schedule RPM builds
on:
#schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '45 21 * * *'

push:
branches: [ master ]

Expand All @@ -14,9 +10,6 @@ on:
description: 'branch ref'
required: true
default: 'master'
timestamp:
description: 'timestamp identifier'
required: true
branch:
description: 'branch name'
default: 'master'
Expand All @@ -42,27 +35,32 @@ jobs:
- name: Archive rpm
uses: actions/upload-artifact@v2
with:
name: rpms-DEM-${{github.event.inputs.branch}}-${{github.event.inputs.timestamp}}
name: rpms
path: dist/*.rpm
if-no-files-found: error

- name: print Name Variables
- name: Check variables
run: |
echo "ref: ${GITHUB_REF}"
echo "ref: ${GITHUB_REF##*/}-draft"
echo "upload_url ${{ steps.create_release.outputs.upload_url }}"
echo "branch: ${{github.event.inputs.branch}}"
echo "ref: draft-${GITHUB_REF##*/}${{github.event.inputs.branch}}"
myREF_tmp="${{github.event.inputs.branch}}"
echo "ref: draft-${myREF_tmp:-${GITHUB_REF##*/}}"
pwd
ls dist
- name: Upload RPMs
run: |
set -x
hub release delete "${GITHUB_REF##*/}-draft" || :
myREF_tmp="${{github.event.inputs.branch}}"
echo "ref: draft-${myREF_tmp:-${GITHUB_REF##*/}}"
hub release delete "draft-${myREF_tmp:-${GITHUB_REF##*/}}" || :
assets=()
for asset in ./dist/*.rpm; do
assets+=("-a" "$asset")
assets+=("-a" "${asset}")
done
hub release create -p "${assets[@]}" -m "${GITHUB_REF##*/}-draft" "${GITHUB_REF##*/}-draft"
echo "hub release exit status: ${?}"
hub release create -p "${assets[@]}" \
-m "RPMs for ${myREF_tmp:-${GITHUB_REF##*/}} branch" \
"draft-${myREF_tmp:-${GITHUB_REF##*/}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c7fa638

Please sign in to comment.