mirror of
https://tvoygit.ru/Djam/r11_workflows.git
synced 2025-02-23 17:02:46 +00:00
update action.yml
This commit is contained in:
parent
17109081b7
commit
6b9fe73583
1 changed files with 66 additions and 94 deletions
52
action.yml
52
action.yml
|
@ -1,26 +1,15 @@
|
|||
version: '1'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- rosa2016.1
|
||||
pull_request:
|
||||
branches:
|
||||
- rosa2016.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
stage: build
|
||||
runs-on: r11_builder
|
||||
env:
|
||||
PUBLICATOR: ${{ secrets.PUBLICATOR }}
|
||||
CI_DEPLOY: ${{ secrets.CI_DEPLOY }}
|
||||
|
||||
name: Build and Deploy
|
||||
description: Build and deploy RPM packages
|
||||
inputs:
|
||||
PUBLICATOR:
|
||||
description: Publicator token
|
||||
required: true
|
||||
CI_DEPLOY:
|
||||
description: CI deploy token
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git ${GITHUB_WORKSPACE}
|
||||
|
@ -29,56 +18,42 @@ jobs:
|
|||
echo "SPECFILE=${SPECFILE}" > .env
|
||||
source .env
|
||||
echo "SPECFILE = ${SPECFILE}"
|
||||
|
||||
- name: Debug Print environment variables
|
||||
run: |
|
||||
source .env
|
||||
env
|
||||
|
||||
- name: Debug os version and check exists spec
|
||||
run: |
|
||||
cat /etc/*release*
|
||||
echo "check specfile" && [ -f ${SPECFILE} ] || exit 1
|
||||
|
||||
- name: Remove djam_personal repo
|
||||
run: sudo urpmi.removemedia djam_personal
|
||||
|
||||
- name: Update repo
|
||||
run: |
|
||||
sudo urpmi.update -fa
|
||||
|
||||
# - name: Set up locale
|
||||
# run: |
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
- name: Download sources artifacts
|
||||
run: |
|
||||
.gitea/workflows/download_sources.sh
|
||||
|
||||
- name: Linter
|
||||
run: |
|
||||
source .env
|
||||
rpmlint ${SPECFILE}
|
||||
|
||||
- name: Install dependies
|
||||
run: |
|
||||
source .env
|
||||
sudo urpmi --buildrequires --auto ${SPECFILE}
|
||||
|
||||
- name: Build rpm
|
||||
run: |
|
||||
source .env
|
||||
rpmbuild -ba ${SPECFILE}
|
||||
|
||||
- name: Deploy in repos packages
|
||||
# if: github.ref == 'refs/heads/rosa2016'
|
||||
if: github.ref == 'refs/heads/rosa2016.1'
|
||||
run: |
|
||||
echo "Deploying artifacts..."
|
||||
curl --user ${GITHUB_REPOSITORY_OWNER}:${CI_DEPLOY} \
|
||||
--upload-file /home/builder/rpmbuild/SRPMS/*.rpm \
|
||||
--upload-file /home/builder/rpmbuild/RPMS/x86_64/*.rpm \
|
||||
${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/rpm/r11/upload
|
||||
|
||||
- name: Deploy in buildkitie
|
||||
run: |
|
||||
echo "Deploying src artifacts..."
|
||||
|
@ -89,6 +64,3 @@ jobs:
|
|||
curl -X POST https://api.buildkite.com/v2/packages/organizations/r11-team/registries/r11-x86-64/packages \
|
||||
-H "Authorization: Bearer ${PUBLICATOR}" \
|
||||
-F "file=@/home/builder/rpmbuild/RPMS/x86_64/*.x86_64.rpm"
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue