Skip to content

Commit 40b8bad

Browse files
Add repo as input for publish debian action (eclipse-zenoh#131)
* 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
1 parent abe1a66 commit 40b8bad

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/release-crates-debian.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ jobs:
7070
ssh-host-path: /home/data/httpd/download.eclipse.org/zenoh/debian-repo
7171
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
7272
ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
73+
repo: ${{ inputs.repo }}

dist/publish-crates-debian-main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127689,6 +127689,7 @@ function setup() {
127689127689
const sshPrivateKey = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("ssh-private-key", { required: true });
127690127690
const sshPassphrase = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("ssh-passphrase", { required: true });
127691127691
const installationTest = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("installation-test", { required: true });
127692+
const repo = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("repo", { required: true });
127692127693
return {
127693127694
liveRun,
127694127695
version,
@@ -127697,6 +127698,7 @@ function setup() {
127697127698
sshPrivateKey,
127698127699
sshPassphrase,
127699127700
installationTest,
127701+
repo,
127700127702
};
127701127703
}
127702127704
function gzip(input) {
@@ -127722,7 +127724,7 @@ async function main(input) {
127722127724
}
127723127725
}
127724127726
const debianRepo = `${input.sshHost}:${input.sshHostPath}`;
127725-
const packagesPath = `.Packages-${input.version}`;
127727+
const packagesPath = `.Packages-${input.repo}-${input.version}`;
127726127728
const allPackagesPath = "Packages";
127727127729
const allPackagesGzippedPath = "Packages.gz";
127728127730
await _ssh__WEBPACK_IMPORTED_MODULE_4__/* .withIdentity */ .Y(input.sshPrivateKey, input.sshPassphrase, env => {

publish-crates-debian/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ inputs:
1515
required: true
1616
installation-test:
1717
required: true
18+
repo:
19+
required: true
1820

1921
runs:
2022
using: node20

src/publish-crates-debian.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type Input = {
2323
sshPrivateKey: string;
2424
sshPassphrase: string;
2525
installationTest: boolean;
26+
repo: string;
2627
};
2728

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

3739
return {
3840
liveRun,
@@ -42,6 +44,7 @@ export function setup(): Input {
4244
sshPrivateKey,
4345
sshPassphrase,
4446
installationTest,
47+
repo,
4548
};
4649
}
4750

@@ -69,7 +72,7 @@ export async function main(input: Input) {
6972
}
7073

7174
const debianRepo = `${input.sshHost}:${input.sshHostPath}`;
72-
const packagesPath = `.Packages-${input.version}`;
75+
const packagesPath = `.Packages-${input.repo}-${input.version}`;
7376
const allPackagesPath = "Packages";
7477
const allPackagesGzippedPath = "Packages.gz";
7578

0 commit comments

Comments
 (0)