Build artifacts not reused ========================== .. list-table:: :stub-columns: 1 :widths: 20 80 * - Rule ID - ``artifact_reuse`` * - Category - energy * - Severity - medium Dependent jobs rebuild artifacts already produced by upstream jobs instead of downloading them via actions/download-artifact. Detection --------- ``heuristic`` — Structural comparison across multiple jobs or steps. Examples -------- **Non-compliant:** .. code-block:: yaml jobs: build: steps: - uses: actions/upload-artifact@v4 with: {name: dist, path: dist/} deploy: needs: build steps: - run: ./deploy.sh **Compliant:** .. code-block:: yaml jobs: build: steps: - uses: actions/upload-artifact@v4 with: {name: dist, path: dist/} deploy: needs: build steps: - uses: actions/download-artifact@v4 with: {name: dist} - run: ./deploy.sh **Fix**: Add an actions/download-artifact step in the dependent job to consume the artifact produced by the upstream job.