Skip to content

Commit

Permalink
migrate to js action
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireW committed Oct 15, 2024
1 parent aa20592 commit b51e8c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dblinter-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,17 @@ async function launchPostgres(config) {
const pgPass = crypto.randomBytes(16).toString('hex');
core.setSecret(pgPass);

console.log("------------ pg container ------------");
const container=await docker.dockerCommand(`run -d -e POSTGRES_PASSWORD=${pgPass} postgres:${config.postgresVersion}`);
console.log("------------ container ------------");
console.log(container);
console.log("------------ /container ------------");

const inspect= await docker.dockerCommand(`inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${container.containerId}`);
const inspect= await docker.dockerCommand(`inspect ${container.containerId}`);
console.log("------------ inspect ------------");
console.log(inspect);
console.log("------------ /inspect ------------");

// -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}'

return {
pgContainer: container.containerId,
pgHost: inspect.raw,
Expand Down Expand Up @@ -206,7 +207,6 @@ async function executeDblinter(options, postgres) {

async function main() {
const options = validateInput();
console.log("options: ", options);
await downloadDockerImage(options);
const postgres = await launchPostgres(options);

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit b51e8c7

Please sign in to comment.