feat: github-actions
This commit is contained in:
7
.github/workflows/docker/Dockerfile
vendored
Normal file
7
.github/workflows/docker/Dockerfile
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
FROM centos:8
|
||||
|
||||
RUN dnf install -y rpmdevtools dnf-utils make
|
||||
|
||||
COPY * /
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
22
.github/workflows/docker/action.yml
vendored
Normal file
22
.github/workflows/docker/action.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: 'make'
|
||||
|
||||
description: 'make <target>'
|
||||
|
||||
inputs:
|
||||
target:
|
||||
description: 'make <target>'
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
outputs:
|
||||
rpm_name:
|
||||
description: 'rpm name'
|
||||
srpm_name:
|
||||
description: 'src.rpm name'
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.target }}
|
||||
|
10
.github/workflows/docker/entrypoint.sh
vendored
Executable file
10
.github/workflows/docker/entrypoint.sh
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
make active && make builddep && make -j$(nproc) "$1"
|
||||
|
||||
RC=$?
|
||||
|
||||
echo "::set-output name=rpm_name::$(find /github/workspace/RPMS -type f -name '*.rpm' -printf '%f\n')"
|
||||
echo "::set-output name=srpm_name::$(find /github/workspace/SRPMS -type f -name '*.src.rpm' -printf '%f\n')"
|
||||
|
||||
exit $RC
|
Reference in New Issue
Block a user