Skip to content

Create Repo for RustDesk latest and nightly #379

Create Repo for RustDesk latest and nightly

Create Repo for RustDesk latest and nightly #379

Workflow file for this run

name: Create Repo for RustDesk latest and nightly
on:
schedule:
# Every 3AM UTC
- cron: "0 3 * * *"
pull_request:
branches:
- 'main'
paths-ignore:
- '**.md'
push:
branches:
- 'main'
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: read
jobs:
verify:
name: Verify container
runs-on: ubuntu-24.04-arm
steps:
- name: Install Cosign
uses: sigstore/cosign-installer@fb28c2b6339dcd94da6e4cbcbc5e888961f6f8c3 # v3.9.0
- name: Verify
run: |
cosign verify --rekor-url=https://rekor.sigstore.dev \
--certificate-identity-regexp "https://github.com/xlionjuan/.*" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
ghcr.io/xlionjuan/fedora-createrepo-image:latest
build:
name: Build
needs: verify
runs-on: ubuntu-24.04-arm
container: ghcr.io/xlionjuan/fedora-createrepo-image:latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Import GPG Key
if: github.event_name != 'pull_request' || startsWith(github.head_ref, 'renovate/')
run: |
echo "$GPG_PRIVATE_KEY" | gpg --batch --yes --import
GPG_PUBLIC_KEY=$(gpg --list-keys --with-colons | grep fpr | head -n1 | cut -d: -f10)
echo "%_signature gpg
%_gpg_name $GPG_PUBLIC_KEY" > ~/.rpmmacros
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Download RustDesk latest and nightly
run: bash rustdesk_latest.sh & bash rustdesk_nightly.sh
- name: Reversion nightly version number with date and recompress
run: |
bash rustdesk_nightly_reversion.sh wwwroot/nightly/ori IS_NIGHTLY &\
bash rustdesk_nightly_reversion.sh wwwroot/nightly-suse/ori IS_NIGHTLY &\
bash rustdesk_nightly_reversion.sh wwwroot/latest/ori "" &\
bash rustdesk_nightly_reversion.sh wwwroot/latest-suse/ori ""
echo "Run tree"
tree
- name: Sign RPMs
if: github.event_name != 'pull_request' || startsWith(github.head_ref, 'renovate/')
run: bash createrepo/1_sign_rpm.sh
- name: Create repo
run: bash createrepo/2_createrepo.sh
- name: Sign repo
if: github.event_name != 'pull_request' || startsWith(github.head_ref, 'renovate/')
run: bash createrepo/3_sign_repo.sh
- name: Sleep 0.5 sec
run: sleep 0.5
- name: Clean up GPG Key
run: rm -rf ~/.gnupg
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
name: github-pages
path: wwwroot
- name: Publish Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: cf_r2
path: wwwroot
if-no-files-found: error
deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04-arm
needs: build
permissions:
contents: read
pages: write
id-token: write # Pages need this too
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
push-to-cf-r2:
name: Push to Cloudflare R2
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04-arm
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: cf_r2
path: wwwroot
merge-multiple: true
- name: Upload to Cloudflare R2
uses: ryand56/r2-upload-action@47013c9cf0012876409579ed17399005aa287b48 # v1.3.4
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
keep-file-fresh: true
source-dir: wwwroot
destination-dir: ./