GitHub 构建 RPM 的操作
GitHub Actions building RPM
目前我正在尝试如何使用 GitHub 操作构建 RPM。
但我总是收到此错误消息:The process '/usr/bin/cp' failed with exit code 1
这是我的操作 link:https://github.com/Robs-Organisation/RobsCalculatorProject/actions/runs/509396649
不太清楚,问题出在哪里。
我的 RPM .spec 文件如下所示:
Name: calculator
Version: 1.0
Release: 1%{?dist}
Summary: a calculator to learn something about gobuffalo
License: All rights reserved
URL: https://github.com/Robs-Organisation/RobsCalculatorProject
Source0: /rpmbuild/tarball/%{name}-%{version}.tar.gz
Requires: postgresql
%description
This is a description
%prep
%setup -q
%build
make
%install
make install
%files
%{_bindir}/%{name}/
我的工作流程文件如下所示:
jobs:
build_tarball:
name: Builds .tar file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build .tar.gz
run: tar -czvf calculator-1.0.tar.gz /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/sourceCode/
- name: Upload calculator-1.0.tar.gz
uses: actions/upload-artifact@v2
with:
name: calTarball
path: calculator-1.0.tar.gz
temp_job:
name: build RPM
needs: build_tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download calculator-1.0.tar.gz
uses: actions/download-artifact@v2
with:
name: calTarball
- name: move file to /rpmbuild/tarball/
run: mv calculator-1.0.tar.gz /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/tarball/
- name: check if move was successful
run: ls /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/tarball/
- name: check for testfile
run: ls /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/specFile/
- name: check for path
run: pwd
- name: RPM Build
# You may pin to the exact commit or the version.
# uses: naveenrajm7/rpmbuild@b52f0e593effaa08f4726afa0d0e2960131685c7
id: rpm
uses: naveenrajm7/rpmbuild@v1.0.0
with:
# path to the spec file
spec_file: /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/specFile/calculator.spec
- name: check for new builds
run: ls
谁有时间看一下,不胜感激!
失败的命令是:
/usr/bin/cp /github/workspace//github/workspace/rpmbuild/specFile/calculator.spec /github/home/rpmbuild/SPECS/
重复的“/github/workspace//github/workspace”似乎有问题。
目前我正在尝试如何使用 GitHub 操作构建 RPM。
但我总是收到此错误消息:The process '/usr/bin/cp' failed with exit code 1
这是我的操作 link:https://github.com/Robs-Organisation/RobsCalculatorProject/actions/runs/509396649
不太清楚,问题出在哪里。
我的 RPM .spec 文件如下所示:
Name: calculator
Version: 1.0
Release: 1%{?dist}
Summary: a calculator to learn something about gobuffalo
License: All rights reserved
URL: https://github.com/Robs-Organisation/RobsCalculatorProject
Source0: /rpmbuild/tarball/%{name}-%{version}.tar.gz
Requires: postgresql
%description
This is a description
%prep
%setup -q
%build
make
%install
make install
%files
%{_bindir}/%{name}/
我的工作流程文件如下所示:
jobs:
build_tarball:
name: Builds .tar file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build .tar.gz
run: tar -czvf calculator-1.0.tar.gz /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/sourceCode/
- name: Upload calculator-1.0.tar.gz
uses: actions/upload-artifact@v2
with:
name: calTarball
path: calculator-1.0.tar.gz
temp_job:
name: build RPM
needs: build_tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download calculator-1.0.tar.gz
uses: actions/download-artifact@v2
with:
name: calTarball
- name: move file to /rpmbuild/tarball/
run: mv calculator-1.0.tar.gz /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/tarball/
- name: check if move was successful
run: ls /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/tarball/
- name: check for testfile
run: ls /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/specFile/
- name: check for path
run: pwd
- name: RPM Build
# You may pin to the exact commit or the version.
# uses: naveenrajm7/rpmbuild@b52f0e593effaa08f4726afa0d0e2960131685c7
id: rpm
uses: naveenrajm7/rpmbuild@v1.0.0
with:
# path to the spec file
spec_file: /home/runner/work/RobsCalculatorProject/RobsCalculatorProject/rpmbuild/specFile/calculator.spec
- name: check for new builds
run: ls
谁有时间看一下,不胜感激!
失败的命令是:
/usr/bin/cp /github/workspace//github/workspace/rpmbuild/specFile/calculator.spec /github/home/rpmbuild/SPECS/
重复的“/github/workspace//github/workspace”似乎有问题。