Skip to content

Commit 3900c8a

Browse files
committed
2021-09-09 16:30:44
1 parent 1aa405a commit 3900c8a

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ jobs:
1919
with:
2020
repo_src: "https://github.com/${{ github.repository }}.git"
2121
repo_dst: "https://github.com/PKG_REPO_NAME.git"
22-
user: "${{ secrets.BUILD_USER_NAME }}"
23-
email: "${{ secrets.BUILD_USER_EMAIL }}"
24-
token: "${{ secrets.BUILD_USER_TOKEN }}"
22+
user_name: "${{ secrets.BUILD_USER_NAME }}"
23+
user_email: "${{ secrets.BUILD_USER_EMAIL }}"
24+
user_token: "${{ secrets.BUILD_USER_TOKEN }}"
2525
```
2626
2727
### Legend
2828
29-
- `repo_src` - source repository URL.
30-
- `repo_dst` - destination repository URL.
31-
- `user` - user name.
32-
- `email` - user email.
33-
- `token` - user token.
29+
- `repo_src` - GitHub source repository URL.
30+
- `repo_dst` - GitHub destination repository URL.
31+
- `user_name` - GitHub user name.
32+
- `user_email` - GitHub user email.
33+
- `user_token` - GitHub user token.
3434

3535
## openSUSE Build Service
3636

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ inputs:
2222
required: true
2323
obs_token:
2424
description: "OBS Token"
25-
required: false
25+
required: true
2626
obs_project:
2727
description: "OBS Project"
28-
required: false
28+
required: true
2929
obs_package:
3030
description: "OBS Package"
31-
required: false
31+
required: true
3232
runs:
3333
using: "docker"
3434
image: "Dockerfile"

build.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ _timestamp() {
3333

3434
# Get repos.
3535
git_clone() {
36+
echo "--- GIT: Clone source & destination repositories..."
37+
3638
SRC="https://${USER_NAME}:${USER_TOKEN}@${REPO_SRC#https://}"
3739
DST="https://${USER_NAME}:${USER_TOKEN}@${REPO_DST#https://}"
3840

@@ -41,18 +43,24 @@ git_clone() {
4143
}
4244

4345
pkg_build() {
46+
echo "--- BUILD: Package..."
47+
4448
pushd "${d_src}/_build" || exit 1
4549
${debuild} -us -uc -i -d -S && popd || exit 1
4650
}
4751

4852
pkg_move() {
53+
echo "--- MOVE: Package..."
54+
4955
for i in _service README.md LICENSE *.tar.* *.dsc *.build *.buildinfo *.changes; do
5056
${rm} -fv "${d_dst}"/${i}
5157
${mv} -fv "${d_src}"/${i} "${d_dst}" || exit 1
5258
done
5359
}
5460

5561
git_push() {
62+
echo "--- GIT: Push destination repository..."
63+
5664
ts="$( _timestamp )"
5765

5866
pushd "${d_dst}" || exit 1
@@ -61,9 +69,12 @@ git_push() {
6169

6270
obs_trigger(){
6371
if [[ -z "${OBS_TOKEN}" ]]; then
72+
echo "${OBS_TOKEN}"
73+
echo "--- TRIGGER: openSUSE Build Service..."
74+
6475
${curl} -H "Authorization: Token ${OBS_TOKEN}" -X POST "https://build.opensuse.org/trigger/runservice?project=${OBS_PROJECT}&package=${OBS_PACKAGE}"
6576
else
66-
echo "OBS_TOKEN not set!"
77+
echo "--- ERROR: OBS_TOKEN not set!"
6778
fi
6879
}
6980

0 commit comments

Comments
 (0)