docs: add input parameters #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
test-tools: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v1 | |
- run: | | |
cd tools | |
nimble test -Y | |
test-script: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .rpmpkg/usr/bin | |
mkdir -p .rpmpkg/usr/lib/testbin | |
echo -e "echo hello" > .rpmpkg/usr/bin/testbin | |
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2 | |
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf | |
chmod +x .rpmpkg/usr/bin/* | |
- uses: ./ | |
with: | |
summary: 'testbin is a test script' | |
package: testbin | |
package_root: .rpmpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'x86_64' | |
desc: | | |
This is sample package. This is sample package. | |
This is sample package. | |
This is sample package. | |
id: build | |
- run: | | |
docker run --rm -v $PWD:/work -t centos:7 bash -c 'rpm -Uvh /work/*.rpm && testbin' | |
- name: Test file_name | |
run: test ${{ steps.build.outputs.file_name }} = 'testbin-1.0.0-1.el7.x86_64.rpm' | |
- name: Test debuginfo_file_name | |
run: test ${{ steps.build.outputs.debuginfo_file_name }} = 'testbin-debuginfo-1.0.0-1.el7.x86_64.rpm' | |
test-script-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .rpmpkg/usr/bin | |
mkdir -p .rpmpkg/usr/lib/testbin | |
echo -e "echo hello" > .rpmpkg/usr/bin/testbin | |
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2 | |
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf | |
chmod +x .rpmpkg/usr/bin/* | |
- uses: jiro4989/build-rpm-action@v2 | |
with: | |
summary: 'testbin is a test script' | |
package: testbin | |
package_root: .rpmpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'x86_64' | |
desc: 'test package' | |
- run: | | |
docker run --rm -v $PWD:/work -t centos:7 bash -c 'rpm -Uvh /work/*.rpm && testbin' | |
test-github-refs-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .rpmpkg/usr/bin | |
mkdir -p .rpmpkg/usr/lib/testbin | |
echo -e "echo hello" > .rpmpkg/usr/bin/testbin | |
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2 | |
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf | |
chmod +x .rpmpkg/usr/bin/* | |
- uses: ./ | |
with: | |
summary: 'testbin is a test script' | |
package: testbin | |
package_root: .rpmpkg | |
maintainer: jiro4989 | |
version: 'refs/tags/v1.0.0' | |
arch: 'x86_64' | |
desc: 'test package' | |
post: 'echo post1' | |
# build_requires: 'perl-Git = 2.43.0' | |
# requires: 'git-core = 2.43.0' | |
- run: | | |
docker run --rm -v $PWD:/work -t centos:7 bash -c 'rpm -Uvh /work/*.rpm && testbin' |