Merge pull request #6287 from sidharthv96/sidv/tokenlessArgos

chore: Add tokenless auth to argos
This commit is contained in:
Sidharth Vinod
2025-02-15 21:30:39 +05:30
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -129,8 +129,6 @@ jobs:
# e.g. if this action was run from a fork
record: ${{ env.RUN_VISUAL_TEST == 'true' && secrets.CYPRESS_RECORD_KEY != '' }}
env:
# Only set Argos environment variables if the visual test comment trigger is present
ARGOS_TOKEN: ${{ env.RUN_VISUAL_TEST == 'true' && secrets.ARGOS_TOKEN || '' }}
ARGOS_PARALLEL: ${{ env.RUN_VISUAL_TEST == 'true' }}
ARGOS_PARALLEL_TOTAL: ${{ env.RUN_VISUAL_TEST == 'true' && strategy.job-total || 1 }}
ARGOS_PARALLEL_INDEX: ${{ env.RUN_VISUAL_TEST == 'true' && matrix.containers || 1 }}

View File

@@ -23,12 +23,10 @@ export default eyesPlugin(
});
// copy any needed variables from process.env to config.env
config.env.useAppli = process.env.USE_APPLI ? true : false;
config.env.useArgos = !!process.env.CI && !!process.env.ARGOS_TOKEN;
config.env.useArgos = process.env.RUN_VISUAL_TEST === 'true';
if (config.env.useArgos) {
registerArgosTask(on, config, {
token: 'argos_cde7ec66b3c53730a7bbe4059a517f4a76',
});
registerArgosTask(on, config);
} else {
addMatchImageSnapshotPlugin(on, config);
}