Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pacman-tool-repo
# pacman-actions

This action adds `repo-add` and `repo-remove` commands to work with pacman db without pacman dependency. Here is the [documentation](https://man.archlinux.org/man/repo-add.8.en) for this tool.
Installing pacman and its tools on Ubuntu24 environment github actions.

Example:

Expand All @@ -11,8 +11,10 @@ jobs:
name: Example
steps:
- uses: actions/checkout@v4
- uses: termux-pacman/pacman-tool-repo@v2.1
- uses: termux-pacman/pacman-actions@v2.4
- run: |
pacman --help
makepkg --help
repo-add --help
repo-remove --help
```
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: pacman-tool-repo
description: 'Tools for working with pacman db of repo.'
name: pacman-actions
description: 'Installing pacman and its tools on Ubuntu24 environment github actions'
author: Termux Pacman
branding:
icon: 'database'
icon: 'tool'
color: 'blue'
runs:
using: 'node20'
Expand Down
16 changes: 5 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const exec = require('@actions/exec');
const core = require('@actions/core');

function error(message) {
function returnError(message) {
core.setFailed(message);
process.exit(1);
}
Expand All @@ -16,9 +16,8 @@ async function installPkg(pkgname) {
await exec.exec("sudo apt install " + pkgname + " -y");
break;
} catch (error) {
if (attempts > 3) {
error("Something went wrong :/");
}
if (attempts > 3)
returnError("Something went wrong :/");
attempts += 1;
continue;
}
Expand All @@ -35,15 +34,10 @@ async function start() {
}
});
if (myOutput.split("=").at(-1).split(".").at(0) != "24") {
error("old version of ubuntu, must be version 24 of ubuntu");
returnError("Old version of ubuntu, must be version 24 of ubuntu");
}

await installPkg("libarchive-tools");

await exec.exec("sudo su -c \"echo 'deb http://archive.ubuntu.com/ubuntu/ oracular universe' > /etc/apt/sources.list.d/oracular.list\"");
await exec.exec("sudo su -c \"echo 'deb-src http://archive.ubuntu.com/ubuntu/ oracular universe' >> /etc/apt/sources.list.d/oracular.list\"");

await installPkg("pacman-package-manager");
await installPkg("libarchive-tools pacman-package-manager");
}

start();
1 change: 0 additions & 1 deletion node_modules/.bin/uuid

This file was deleted.

49 changes: 27 additions & 22 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

151 changes: 151 additions & 0 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions node_modules/@actions/core/lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/command.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions node_modules/@actions/core/lib/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading