-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.16 KB
/
test.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
name: Test
on:
push:
pull_request:
jobs:
action:
runs-on: ubuntu-latest
steps:
- name: Create mock project tarball
run: |
echo "#!/bin/bash" > test.sh
echo "echo I am here." >> test.sh
tar -cvzf action-build-srpm-1.tar.gz --transform "s,^,action-build-srpm-1/," *
- name: Create spec file
shell: bash
run: |
cat <<EOF > test.spec
Name: action-build-srpm
Version: 1
Release: 1%{?dist}
Summary: Test action-build-srpm
URL: https://github.com/next-actions/action-build-srpm
License: GPLv3+
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
%description
Test action-build-srpm.
%prep
%setup -q
%install
mkdir -p %{buildroot}/%{_bindir}
mv test.sh %{buildroot}/%{_bindir}/
chmod a+x %{buildroot}/%{_bindir}/test.sh
%files
%{_bindir}/test.sh
EOF
- name: Build source rpm
uses: next-actions/build-srpm@master
with:
tarball: action-build-srpm-1.tar.gz
specfile: test.spec