@@ -120,6 +120,17 @@ jobs:
120
120
uses : actions/checkout@v3
121
121
with :
122
122
repository : minio/minio
123
+ - name : Check-out matching MinIO branch
124
+ env :
125
+ GH_OWNER : ${{ github.repository_owner }}
126
+ GH_BRANCH : ${{ github.head_ref || github.ref_name }}
127
+ run : |
128
+ if [ ! "$GH_OWNER" = "minio" ]; then
129
+ ALTREPO="https://github.com/$GH_OWNER/minio.git"
130
+ echo "Attempting to fetch $ALTREPO..."
131
+ git remote add alt $ALTREPO
132
+ (git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
133
+ fi
123
134
- name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
124
135
uses : actions/setup-go@v3
125
136
with :
@@ -817,6 +828,18 @@ jobs:
817
828
with :
818
829
repository : minio/minio
819
830
path : " minio_repository"
831
+ - name : Check-out matching MinIO branch
832
+ env :
833
+ GH_OWNER : ${{ github.repository_owner }}
834
+ GH_BRANCH : ${{ github.head_ref || github.ref_name }}
835
+ run : |
836
+ cd minio_repository
837
+ if [ ! "$GH_OWNER" = "minio" ]; then
838
+ ALTREPO="https://github.com/$GH_OWNER/minio.git"
839
+ echo "Attempting to fetch $ALTREPO..."
840
+ git remote add alt $ALTREPO
841
+ (git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
842
+ fi
820
843
- uses : actions/cache@v3
821
844
id : minio-latest-cache
822
845
name : MinIO Latest Cache
@@ -910,6 +933,18 @@ jobs:
910
933
with :
911
934
repository : minio/minio
912
935
path : " minio_repository"
936
+ - name : Check-out matching MinIO branch
937
+ env :
938
+ GH_OWNER : ${{ github.repository_owner }}
939
+ GH_BRANCH : ${{ github.head_ref || github.ref_name }}
940
+ run : |
941
+ cd minio_repository
942
+ if [ ! "$GH_OWNER" = "minio" ]; then
943
+ ALTREPO="https://github.com/$GH_OWNER/minio.git"
944
+ echo "Attempting to fetch $ALTREPO..."
945
+ git remote add alt $ALTREPO
946
+ (git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
947
+ fi
913
948
- uses : actions/cache@v3
914
949
id : minio-latest-cache
915
950
name : MinIO Latest Cache
@@ -981,6 +1016,24 @@ jobs:
981
1016
with :
982
1017
repository : minio/minio
983
1018
path : " minio_repository"
1019
+ - name : Check-out matching MinIO branch
1020
+ env :
1021
+ GH_OWNER : ${{ github.repository_owner }}
1022
+ GH_BRANCH : ${{ github.head_ref || github.ref_name }}
1023
+ run : |
1024
+ cd minio_repository
1025
+ if [ ! "$GH_OWNER" = "minio" ]; then
1026
+ ALTREPO="https://github.com/$GH_OWNER/minio.git"
1027
+ echo "Attempting to fetch $ALTREPO..."
1028
+ git remote add alt $ALTREPO
1029
+ (git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
1030
+ fi
1031
+
1032
+ - name : Checkout proper minio/minio branch
1033
+ run : |
1034
+
1035
+ git checkout "${{ github.head_ref || github.ref_name }}" || echo "Okay, we'll stay on the master branch"
1036
+
984
1037
- uses : actions/cache@v3
985
1038
id : minio-latest-cache
986
1039
name : MinIO Latest Cache
0 commit comments