- update docker images to use git.unkin.net - update path to save rpms to git.unkin.net
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy-8:
|
|
runs-on: almalinux-8
|
|
container:
|
|
image: git.unkin.net/unkin/almalinux8-actionsdind:latest
|
|
options: --privileged
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Artifacts
|
|
run: |
|
|
mkdir -p /workspace/unkin/rpmbuilder/dist/8
|
|
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
|
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-8"
|
|
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/8
|
|
|
|
- name: Show RPMs
|
|
run: |
|
|
find /workspace -type f -name "*.rpm"
|
|
|
|
- name: Upload RPMs to Gitea
|
|
env:
|
|
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
|
run: |
|
|
for rpm in $(find /workspace/unkin/rpmbuilder/dist/8 -type f -name "*.rpm"); do
|
|
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el8/upload
|
|
done
|
|
|
|
deploy-9:
|
|
runs-on: almalinux-8
|
|
container:
|
|
image: git.unkin.net/unkin/almalinux9-actionsdind:latest
|
|
options: --privileged
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Artifacts
|
|
run: |
|
|
mkdir -p /workspace/unkin/rpmbuilder/dist/9
|
|
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
|
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-9"
|
|
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/9
|
|
|
|
- name: Show RPMs
|
|
run: |
|
|
find /workspace -type f -name "*.rpm"
|
|
|
|
- name: Upload RPMs to Gitea
|
|
env:
|
|
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
|
run: |
|
|
for rpm in $(find /workspace/unkin/rpmbuilder/dist/9 -type f -name "*.rpm"); do
|
|
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el9/upload
|
|
done
|