Skip to content

Commit 9b987be

Browse files
committed
refactor(ci): Use actions/upload-artifact to upload alpine packages
1 parent b484893 commit 9b987be

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

.github/workflows/ci.yml

+31-33
Original file line numberDiff line numberDiff line change
@@ -456,40 +456,39 @@ jobs:
456456
chown -R opam "${GITHUB_OUTPUT}"
457457
sudo -u opam -E ./.github/scripts/build-apk.sh ${{ needs.build_details.outputs.branch }} ${{ matrix.os }} ${{ matrix.platform }} ${{ matrix.alpine-arch }} "${{ needs.build_details.outputs.is_rolling_release }}" "${{ needs.build_details.outputs.is_release }}" "${{ needs.build_details.outputs.minimal_exclude_deps }}"
458458
- name: Upload alpine packages artifacts
459-
if: needs.build_details.outputs.is_fork != 'true' && matrix.os == 'alpine'
460-
uses: savonet/aws-s3-docker-action@master
459+
if: contains(matrix.os, 'alpine')
460+
uses: actions/upload-artifact@v4
461461
env:
462-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
463-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
464-
SOURCE: ${{ github.workspace }}/${{ github.run_number }}/${{ matrix.os }}_${{ matrix.platform }}/alpine
465-
TARGET: ${{ needs.build_details.outputs.s3-artifact-basepath }}
462+
name: ${{ steps.build_apk.outputs.basename }}
463+
path: ${{ github.workspace }}/${{ github.run_number }}/${{ matrix.os }}_${{ matrix.platform }}/alpine
464+
if-no-files-found: error
466465
- name: Cleanup
467466
if: ${{ always() }}
468467
run: |
469468
rm -rf /tmp/${{ github.run_number }}/${{ matrix.os }}_${{ matrix.platform }}
470469
471-
fetch_s3_artifacts:
472-
runs-on: ubuntu-latest
473-
needs: [build_details, build_posix]
474-
steps:
475-
- name: Prepare directory
476-
run: |
477-
rm -rf ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
478-
mkdir -p ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
479-
- name: Fetch S3 artifacts
480-
if: needs.build_details.outputs.is_fork != 'true'
481-
uses: savonet/aws-s3-docker-action@master
482-
env:
483-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
484-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
485-
SOURCE: ${{ needs.build_details.outputs.s3-artifact-basepath }}
486-
TARGET: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
487-
- name: Upload S3 artifacts
488-
uses: actions/upload-artifact@v4
489-
if: needs.build_details.outputs.is_fork != 'true'
490-
with:
491-
name: alpine-packages
492-
path: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
470+
# fetch_s3_artifacts:
471+
# runs-on: ubuntu-latest
472+
# needs: [build_details, build_posix]
473+
# steps:
474+
# - name: Prepare directory
475+
# run: |
476+
# rm -rf ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
477+
# mkdir -p ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
478+
# - name: Fetch S3 artifacts
479+
# if: needs.build_details.outputs.is_fork != 'true'
480+
# uses: savonet/aws-s3-docker-action@master
481+
# env:
482+
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
483+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
484+
# SOURCE: ${{ needs.build_details.outputs.s3-artifact-basepath }}
485+
# TARGET: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
486+
# - name: Upload S3 artifacts
487+
# uses: actions/upload-artifact@v4
488+
# if: needs.build_details.outputs.is_fork != 'true'
489+
# with:
490+
# name: alpine-packages
491+
# path: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts
493492

494493
build_win32:
495494
runs-on: depot-ubuntu-22.04-4
@@ -551,7 +550,6 @@ jobs:
551550
run_tests,
552551
build_posix,
553552
build_win32,
554-
fetch_s3_artifacts,
555553
]
556554
if: needs.build_details.outputs.is_release
557555
steps:
@@ -615,7 +613,7 @@ jobs:
615613

616614
build_docker:
617615
runs-on: ${{ matrix.runs-on }}
618-
needs: [build_details, build_posix, fetch_s3_artifacts]
616+
needs: [build_details, build_posix]
619617
strategy:
620618
fail-fast: false
621619
matrix:
@@ -666,7 +664,7 @@ jobs:
666664

667665
build_docker_alpine:
668666
runs-on: ${{ matrix.runs-on }}
669-
needs: [build_details, build_posix, fetch_s3_artifacts]
667+
needs: [build_details, build_posix]
670668
strategy:
671669
fail-fast: false
672670
matrix:
@@ -712,7 +710,7 @@ jobs:
712710

713711
build_docker_minimal:
714712
runs-on: ${{ matrix.runs-on }}
715-
needs: [build_details, build_posix, fetch_s3_artifacts]
713+
needs: [build_details, build_posix]
716714
strategy:
717715
fail-fast: false
718716
matrix:
@@ -763,7 +761,7 @@ jobs:
763761

764762
build_docker_alpine_minimal:
765763
runs-on: ${{ matrix.runs-on }}
766-
needs: [build_details, build_posix, fetch_s3_artifacts]
764+
needs: [build_details, build_posix]
767765
strategy:
768766
fail-fast: false
769767
matrix:

0 commit comments

Comments
 (0)