Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished create_package_update_pr.yml #38

Merged
merged 10 commits into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/create_package_update_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,30 @@ jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
wget https://aur.archlinux.org/cgit/aur.git/snapshot/${{ inputs.package_name }}.tar.gz
tar --overwrite -xf visual-studio-code-bin.tar.gz -C packages/${{ inputs.package_name }} --strip-components=1
packages/${{ inputs.package_name }}
ls
tar --overwrite -xf ${{ inputs.package_name }}.tar.gz -C packages/${{ inputs.package_name }} --strip-components=1
cd packages/${{ inputs.package_name }}
pkgver=$(cat .SRCINFO | grep pkgver | cut -d' ' -f 3)
echo "PKGVER=$pkgver" >> $GITHUB_ENV
pkgrel=$(cat .SRCINFO | grep pkgrel | cut -d' ' -f 3)
git checkout package/${{ inputs.package_name }}
git add .
git commit -m "${{ inputs.package_name }} v$pkgver-$pkgrel"
git push
gh pr create -B master -H package/${{ inputs.package_name }} --title "${{ inputs.package_name }} v$pkgver-$pkgrel" --body 'Created by Github action'
echo "PKGREL=$pkgrel" >> $GITHUB_ENV
#git checkout -b package/${{ inputs.package_name }}
#git add .
#git commit -m "${{ inputs.package_name }} v$pkgver-$pkgrel"
#git push
#gh pr create -B master -H package/${{ inputs.package_name }} --title "${{ inputs.package_name }} v$pkgver-$pkgrel" --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.REPO_TOKEN }}
add-paths: |
packages/*
commit-message: "${{ inputs.package_name }} v${{ env.PKGVER }}-${{ env.PKGREL }}"
branch: "package/${{ inputs.package_name }}"
base: master
title: "${{ inputs.package_name }} v${{ env.PKGVER }}-${{ env.PKGREL }}"
body: ""