-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.yml
55 lines (41 loc) · 1.87 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.event.pusher.email != 'github-action@noreply.com'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup Git Config
run: |
git config --global user.name "Git Action"
git config --global user.email github-action@noreply.com
- name: Get Latest FlossWare Scripts
run: |
cd ${GITHUB_WORKSPACE}/flossware-scripts
git checkout .
cd -
git submodule foreach git checkout master
git submodule foreach git pull
git submodule update --remote --merge
- name: Rev Spec File
run: ${GITHUB_WORKSPACE}/flossware-scripts/bash/continuous-delivery/prepare-rpm-git-release.sh flossware.spec
- name: Build RPM
run: ${GITHUB_WORKSPACE}/buildrpm.sh ${GITHUB_WORKSPACE}/../rpmbuilds
- name: Push Git Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
- name: Publish to Bintray
run: ${GITHUB_WORKSPACE}/flossware-scripts/bash/bintray/rpm-publish.sh --bintrayUser sfloess --bintrayKey ${{ secrets.BINTRAY_API_KEY }} --bintrayAccount flossware --bintrayRepo rpm --bintrayPackage cobbler --bintrayFile ${GITHUB_WORKSPACE}/../rpmbuilds/rpm/RPMS/noarch/`ls -t ${GITHUB_WORKSPACE}/../rpmbuilds/rpm/RPMS/noarch | head -1` --bintrayContext flossware.spec