Skip to content

Merge main into sweep/sweep_gha_fix_the_github_actions_run_fai_c2a4b #13

Merge main into sweep/sweep_gha_fix_the_github_actions_run_fai_c2a4b

Merge main into sweep/sweep_gha_fix_the_github_actions_run_fai_c2a4b #13

Workflow file for this run

// main.ts
import * as fs from 'fs';
function updateDockerLoginAction(username: string, password: string): void {

Check failure on line 5 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 5
const workflowFilePath = '.github/workflows/main.yml';
const workflowFileContent = fs.readFileSync(workflowFilePath, 'utf8');
// Update the "docker/login-action@v2" command with the provided username and password
const updatedWorkflowFileContent = workflowFileContent.replace(
'docker/login-action@v2',
`docker/login-action@v2\n with:\n username: ${{ secrets.DOCKER_USERNAME }}\n password: ${{ secrets.DOCKER_PASSWORD }}`
);
fs.writeFileSync(workflowFilePath, updatedWorkflowFileContent);
}
function storeSecret(name: string, value: string): void {
// Store the secret securely
// Implementation details depend on the platform being used
// For example, in GitHub Actions, you can use the `actions/secrets` package
// to store the secret as a repository secret
}
// Usage example
const username = 'your_username';
const password = 'your_password';
storeSecret('DOCKER_USERNAME', username);
storeSecret('DOCKER_PASSWORD', password);
updateDockerLoginAction(username, password);