Skip to content

Commit

Permalink
Add repo as input for publish debian action (eclipse-zenoh#131)
Browse files Browse the repository at this point in the history
* Add repo as input for publish debian action

We now include the repo as part of the temporary
.Packages-$repo-$version file used to generate Packages.gz for the
debian repository. This way the temporary .Packages file is not
overwritten per package when the action runs causing Packages.gz to be
built with missing Packages.

* npm run build to transpile ts to js
  • Loading branch information
diogomatsubara authored May 7, 2024
1 parent abe1a66 commit 40b8bad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-crates-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ jobs:
ssh-host-path: /home/data/httpd/download.eclipse.org/zenoh/debian-repo
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
repo: ${{ inputs.repo }}
4 changes: 3 additions & 1 deletion dist/publish-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127689,6 +127689,7 @@ function setup() {
const sshPrivateKey = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("ssh-private-key", { required: true });
const sshPassphrase = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("ssh-passphrase", { required: true });
const installationTest = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("installation-test", { required: true });
const repo = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("repo", { required: true });
return {
liveRun,
version,
Expand All @@ -127697,6 +127698,7 @@ function setup() {
sshPrivateKey,
sshPassphrase,
installationTest,
repo,
};
}
function gzip(input) {
Expand All @@ -127722,7 +127724,7 @@ async function main(input) {
}
}
const debianRepo = `${input.sshHost}:${input.sshHostPath}`;
const packagesPath = `.Packages-${input.version}`;
const packagesPath = `.Packages-${input.repo}-${input.version}`;
const allPackagesPath = "Packages";
const allPackagesGzippedPath = "Packages.gz";
await _ssh__WEBPACK_IMPORTED_MODULE_4__/* .withIdentity */ .Y(input.sshPrivateKey, input.sshPassphrase, env => {
Expand Down
2 changes: 2 additions & 0 deletions publish-crates-debian/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ inputs:
required: true
installation-test:
required: true
repo:
required: true

runs:
using: node20
Expand Down
5 changes: 4 additions & 1 deletion src/publish-crates-debian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type Input = {
sshPrivateKey: string;
sshPassphrase: string;
installationTest: boolean;
repo: string;
};

export function setup(): Input {
Expand All @@ -33,6 +34,7 @@ export function setup(): Input {
const sshPrivateKey = core.getInput("ssh-private-key", { required: true });
const sshPassphrase = core.getInput("ssh-passphrase", { required: true });
const installationTest = core.getBooleanInput("installation-test", { required: true });
const repo = core.getInput("repo", {required: true});

return {
liveRun,
Expand All @@ -42,6 +44,7 @@ export function setup(): Input {
sshPrivateKey,
sshPassphrase,
installationTest,
repo,
};
}

Expand Down Expand Up @@ -69,7 +72,7 @@ export async function main(input: Input) {
}

const debianRepo = `${input.sshHost}:${input.sshHostPath}`;
const packagesPath = `.Packages-${input.version}`;
const packagesPath = `.Packages-${input.repo}-${input.version}`;
const allPackagesPath = "Packages";
const allPackagesGzippedPath = "Packages.gz";

Expand Down

0 comments on commit 40b8bad

Please sign in to comment.