Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@k1LoW
Copy link
Owner

@k1LoW k1LoW commented Sep 25, 2025

This pull request updates the artifact storage logic to improve how artifacts are uploaded and managed in GitHub Actions. The main changes involve passing explicit repository and workflow run information to artifact uploads and ensuring old artifacts with the same name are deleted before uploading new ones.

Artifact upload improvements:

  • The PutArtifact method in gh.go now requires explicit owner, repo, and runID parameters, and deletes any existing artifact with the same name before uploading the new one. This prevents duplicate artifacts and ensures the latest artifact is always stored.
  • The Put method in artifact.go is updated to parse the repository information and retrieve the GITHUB_RUN_ID from the environment, passing these values to PutArtifact. This ensures the artifact is associated with the correct workflow run and repository.

Dependency and import changes:

  • Added imports for os and strconv in artifact.go to support environment variable access and string-to-integer conversion.

@k1LoW k1LoW self-assigned this Sep 25, 2025
@github-actions

This comment has been minimized.

@k1LoW k1LoW force-pushed the support-override-artifact branch from b3ee482 to b1f1af0 Compare September 25, 2025 07:07
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

Code Metrics Report

main (e8d457e) #564 (36327df) +/-
Coverage 51.7% 51.5% -0.2%
Code to Test Ratio 1:0.6 1:0.6 -0.1
Test Execution Time 29s 26s -3s
Details
  |                     | main (e8d457e) | #564 (36327df) |  +/-  |
  |---------------------|----------------|----------------|-------|
- | Coverage            |          51.7% |          51.5% | -0.2% |
  |   Files             |             53 |             53 |     0 |
  |   Lines             |           3946 |           3963 |   +17 |
+ |   Covered           |           2042 |           2043 |    +1 |
- | Code to Test Ratio  |          1:0.6 |          1:0.6 |  -0.1 |
  |   Code              |           7682 |           7708 |   +26 |
  |   Test              |           4869 |           4869 |     0 |
+ | Test Execution Time |            29s |            26s |   -3s |

Code coverage of files in pull request scope (28.9% → 28.3%)

Files Coverage +/- Status
config/config.go 62.1% +0.5% affected
datastore/artifact/artifact.go 0.0% 0.0% modified
gh/gh.go 15.7% -0.4% modified

Benchmark-0 (this is custom metrics test)

main (e8d457e) #564 (36327df) +/-
Number of iterations 1000 1000 0
Nanoseconds per iteration 676.5 ns/op 676.5 ns/op 0 ns/op
Metadata
main (e8d457e) #564 (36327df)
GOOS darwin darwin
GOARCH amd64 amd64

Benchmark-1 (this is custom metrics test)

main (e8d457e) #564 (36327df) +/-
Number of iterations 1500 1500 0
Nanoseconds per iteration 1345 ns/op 1345 ns/op 0 ns/op
Metadata
main (e8d457e) #564 (36327df)
GOOS darwin darwin
GOARCH amd64 amd64

Reported by octocov

@k1LoW k1LoW added the minor label Sep 25, 2025
@k1LoW k1LoW merged commit 182e240 into main Sep 25, 2025
7 checks passed
@k1LoW k1LoW deleted the support-override-artifact branch September 25, 2025 07:17
@github-actions github-actions bot mentioned this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants