From 3fdf1b2057221a32d9e71f9f65b5726bc470bc6e Mon Sep 17 00:00:00 2001 From: zhullyb Date: Tue, 30 Apr 2024 13:19:27 +0800 Subject: [PATCH] master branch init --- .github/workflows/dae-build-trigger.yml | 14 ++++++++ .github/workflows/upgpkg-dae.yml | 47 +++++++++++++++++++++++++ README.md | 1 + 3 files changed, 62 insertions(+) create mode 100644 .github/workflows/dae-build-trigger.yml create mode 100644 .github/workflows/upgpkg-dae.yml create mode 100644 README.md diff --git a/.github/workflows/dae-build-trigger.yml b/.github/workflows/dae-build-trigger.yml new file mode 100644 index 0000000..e97c791 --- /dev/null +++ b/.github/workflows/dae-build-trigger.yml @@ -0,0 +1,14 @@ +name: dae CORP Build Trigger +on: + workflow_dispatch: + push: + branches: + - dae + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Trigger dae build + run: | + curl -X POST ${{ secrets.COPR_HOOK_URL }}dae/ diff --git a/.github/workflows/upgpkg-dae.yml b/.github/workflows/upgpkg-dae.yml new file mode 100644 index 0000000..a54bb2b --- /dev/null +++ b/.github/workflows/upgpkg-dae.yml @@ -0,0 +1,47 @@ +name: Upgpkg Dae SPEC Version +on: + workflow_dispatch: + schedule: + - cron: '0 0 */1 * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: dae + + - name: Get Current Version + run: | + CURRENT_VERSION=`grep -E '^Version:' *.spec | awk '{print $2}'` + echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV + + - name: Export latest dae version + run: | + NEW_VERSION=`curl -s https://api.github.com/repos/daeuniverse/dae/releases/latest | jq -r '.tag_name' | sed 's/v//g'` + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Run rpmdev-bumpspec action + if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }} + uses: netoarmando/rpmdev-bumpspec-action@v1 + with: + specfile: 'dae.spec' + new: ${{ env.NEW_VERSION }} + userstring: "zhullyb " + + - name: Commit changes + if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }} + run: | + git config --local user.email "zhullyb@outlook.com" + git config --local user.name "zhullyb" + git add . + git commit -m "upgpkg: dae@${{ env.NEW_VERSION }}" + git push + + - name: trigger copr webhook + if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }} + run: | + curl -X POST ${{ secrets.COPR_HOOK_URL }}dae/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..357bb41 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# The Repo For COPR build \ No newline at end of file