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

Add test_flags input #32

Merged
merged 4 commits into from
Nov 14, 2022
Merged

Add test_flags input #32

merged 4 commits into from
Nov 14, 2022

Conversation

fuljo
Copy link
Contributor

@fuljo fuljo commented Nov 13, 2022

I really enjoyed the test option to check that the package could be succesfully built with makepkg. The only flaw for me is that its command line flags are fixed:

if [ "$test" == "true" ]; then
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg --clean --cleanbuild --nodeps
echo '::endgroup::'
fi

Changes

This PR adds a new input called test_flags which sets the command line flags for makepkg.
Its default value falls back to the old behavior, so there are no regression problems.

Furthermore, it makes the builder user a sudoer so it is able to install the dependencies.

Example

I use it in this workflow where I need to install dependencies in order to build the package, and I also check that it installs successfully. Here is the interesting snippet:

      - name: Publish PKGBUILD
        uses: fuljo/github-actions-deploy-aur@master
        with:
          pkgname: rofi-vscode-mode
          pkgbuild: PKGBUILD
          updpkgsums: true
          test: true
          test_flags: --clean --cleanbuild --syncdeps --install --noconfirm
          commit_username: ${{ secrets.AUR_USERNAME }}
          commit_email: ${{ secrets.AUR_EMAIL }}
          ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}

You can see a succesful run of my fork here.

The input sets the command-line flags provided to `makepkg` when
trying to build the package (if the `test` option is enabled).
The input is optional and its default value is the same as before
introducing this input.
This is needed to be able to install packages with makepkg
build.sh Outdated Show resolved Hide resolved
entrypoint.sh Show resolved Hide resolved
@KSXGitHub
Copy link
Owner

After you resolve my requests, can you test fuljo/github-actions-deploy-aur@<LATEST_COMMIT_ID> on your CI and tell me the result?

build.sh Show resolved Hide resolved
@KSXGitHub
Copy link
Owner

Can you try fuljo/github-actions-deploy-aur@bdefd9f7ff1514fc31f6aeef4c611d853bd4a3f9 on your CI and tell me the result?

@fuljo
Copy link
Contributor Author

fuljo commented Nov 14, 2022

Here is a successful run from a few minutes ago: https://github.com/fuljo/rofi-vscode-mode/actions/runs/3463753986

I used the @master ref just so as not to re-commit my workflow file.

@KSXGitHub KSXGitHub merged commit 065b605 into KSXGitHub:master Nov 14, 2022
@KSXGitHub
Copy link
Owner

v2.6.0 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants