Closed D4llo closed 9 months ago
Yeah, you need to use an SSH private key without a passphrase. Otherwise GitHub Actions is not able to unlock it.
Everything else looks correct.
Alright I am going to try that. Thanks a lot for your work and the quick comment!
It worked. kinda. I have a new issue later on. Should I keep posting over here or should I create a new issue?
This is about this action https://github.com/D4llo/surfshark-yac/actions/runs/7716321502/job/21032834330
Edit: I think I got it. Still working on it
This issue is fine.
What's the new problem?
I dont think that it is related to the template. I am not sure.
I am trying to push an AUR package based on a deb package. The script is looking to download the deb file through curl but failed.
I can wget the .deb in local
Here is the log of the GitHub Actions
link: https://github.com/D4llo/surfshark-yac/actions/runs/7717047680/job/21035250047
There is another issue about the missing pacman-key --init
. Could it be related?
Just saw that the url path seems to have change. Let's remove the subpath /surfshark/
Edit: OH BOY https://github.com/D4llo/surfshark-yac/actions/runs/7718706385/job/21040539081?pr=7
Edit 2: Ok the publish just started https://github.com/D4llo/surfshark-yac/actions/runs/7718728168/job/21040599267
Edit 3: and it failed ==> ERROR: install file (surfshark-yac.install) does not exist or is not a regular file.
Let's dig. https://github.com/D4llo/surfshark-yac/actions/runs/7718728168/job/21040599267#step:5:83
Cloning AUR package into /tmp/local-repo
Cloning into '/tmp/local-repo'...
POST git-upload-pack (175 bytes)
warning: You appear to have cloned an empty repository.
Why this repository is empty? Should I init it in some way? Maybe in the AUR side?
What is a regular file? Because indeed the surfshark-yac.install is not a common file. Maybe we are expected a specific name or something like that. How to include it properly?
Ok I am digging the "not included" idea. Let's follow this line:
- name: Commit
if: ${{ env.pkgbuild != '' }}
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
file_pattern: '*/PKGBUILD */.SRCINFO'
I think that I should edit the file_pattern to include everything or add a argument for my file.
Edit: as per the stefanzweifel/git-auto-commit-action's documentation. It should work.
`file_pattern` is used both for `git-status` and `git-add` in this Action. `git-add` will throw a fatal error, if for example, you use a file pattern like `*.js *.ts` but no `*.ts` files exist in your projects' repository.
Failed again
But I think I am on something
Edit: nevermind it is "*/" and not "./" LMAO
Still failing...
https://github.com/D4llo/surfshark-yac/actions/runs/7725179403/job/21058847363#step:5:92
FYI this is the pattern now
I am a bit puzzled...
I think it's because it's looking for surfshark-yac.install
in the root of the directory, but it's in the surfshark-yac
sub-directory. Can you try set working-directory
for that step?
Not sure how to do that. Should I do this in .github/workflows/publish.yml
?
- name: Publish package
working-directory: ./surfshark-yac
uses: KSXGitHub/github-actions-deploy-aur@063daf78a56662642bb00049ce78425ff6d0fad7 # v2.7.0
if: ${{ env.pkgbuild != '' }}
with:
pkgname: ${{ env.pkgbuild }}
pkgbuild: ${{ env.pkgbuild }}/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
or during the packaging in updpkgsums.yml
?
- name: Commit
working-directory: ./surfshark-yac
if: ${{ env.pkgbuild != '' }}
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
file_pattern: '*/PKGBUILD */.SRCINFO */surfshark-yac.install */.gitignore'
Well it is not that
Just saw that in the project gp-saml-gui your adding an extra .sh with source like this?
Should I add my .install like this?
As per the doc I shouldn't:
.install files are recognized automatically by makepkg and should not be included in the source array.
The project gnome-shell-extension-emoji-selector-git uses a .install file like this install = gnome-shell-extension.install
. I guess that the usage of a hard-coded name is to alias and remove the "emoji-selector-git" section.
Is there any other reason that my project could benefit from?
By the way why did I had to have the following file_pattern to include my .install when gnome-shell-extension uses the regular file_pattern from the template without trouble.
file_pattern: '*/PKGBUILD */.SRCINFO */surfshark-yac.install */.gitignore'
Did I miss anything?
Yeah, can you copy gnome-shell-extension-emoji-selector-git
as an example and see if it works for you?
The diff can be seen here: https://github.com/D4llo/surfshark-yac/pull/13/files?diff=split&w=1
Not sure what to do from here
remote: Permission to D4llo/surfshark-yac.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/D4llo/surfshark-yac/': The requested URL returned error: 403
Error: Invalid status code: 128
at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/8756aa072ef5b4a080af5dc8fef36c5d586e521d/index.js:17:19)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 128
}
Error: Invalid status code: 128
at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/8756aa072ef5b4a080af5dc8fef36c5d586e521d/index.js:17:19)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
That error is because it's in the wrong directory. The build script expects the directory to be the same name as the package.
Alright make sense
Action https://github.com/D4llo/surfshark-yac/actions/runs/7826796877/job/21353319753
After searching for the error online I edited some permissions
https://stackoverflow.com/a/75308228/1248177
To avoid this manual steps we could add the following permission to the workflow file
permissions:
contents: write
Should I merge to try to publish? https://github.com/D4llo/surfshark-yac/pull/13
It is working
Excellent! I'm glad it's working.
Now I have to make my own package works.
Still the same issue
Try add assets: ${{ env.pkgbuild }}/*
to the with
of the Publish package
step
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ff693a8..f074aab 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -29,6 +29,7 @@ jobs:
with:
pkgname: ${{ env.pkgbuild }}
pkgbuild: ${{ env.pkgbuild }}/PKGBUILD
+ assets: ${{ env.pkgbuild }}/*
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
It works!!!!!!!!!
Excellent!
Hello,
I am trying to submit a package to the AUR with this template. Here is my repository https://github.com/D4llo/surfshark-yac/
Both GH actions fail. I think that I missed something but I am not sure what. Do you have any idea?
Publish action: https://github.com/D4llo/surfshark-yac/actions/runs/7702075403
I tested my passpharse locally with
ssh-keygen -y -P "<my_passphrase>" -f ~/.ssh/id_ed25519
and it works as expectedUpdpkgsums action: https://github.com/D4llo/surfshark-yac/actions/workflows/updpkgsums.yml
Note that this my first time submitting something to the AUR.
My pub key is on my AUR account:
My passphrase, my login and my mail are set as Repository secrets
(maybe it should be Environment secrets?)
Cheers,
source: