File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 19
19
paths :
20
20
- " .github/workflows/build.yml"
21
21
- " docker/**"
22
- - " build .sh"
22
+ - " * .sh"
23
23
24
24
concurrency :
25
25
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
68
68
run : ./build.sh
69
69
70
70
- name : Deploy
71
- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux'
72
- run : ./deploy.sh
71
+ run : ./deploy.sh ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux') && '' || '--dry-run' }}
73
72
env :
74
73
QUAY_USERNAME : ${{ secrets.QUAY_USERNAME }}
75
74
QUAY_PASSWORD : ${{ secrets.QUAY_PASSWORD }}
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ set -euo pipefail
4
4
5
5
export TZ=UTC0
6
6
7
+ DRY_RUN=0
8
+ if [ " ${1:- } " == " --dry-run" ]; then
9
+ DRY_RUN=1
10
+ set -x
11
+ fi
12
+
7
13
TAG=" quay.io/pypa/${POLICY} _${PLATFORM} "
8
14
COMMIT_ABBREV_SHA=$( git show -s --format=%h ${COMMIT_SHA} )
9
15
COMMIT_DATE=$( git show -s --format=%cd --date=short ${COMMIT_SHA} )
16
22
BUILD_NUMBER=$( git rev-list --since=${COMMIT_DATE} T00:00:00Z --count ${COMMIT_SHA} )
17
23
BUILD_ID2=${COMMIT_DATE// -/ .} .${BUILD_NUMBER}
18
24
19
- docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
20
25
docker tag ${TAG} :${COMMIT_SHA} ${TAG} :${BUILD_ID}
21
26
docker tag ${TAG} :${COMMIT_SHA} ${TAG} :${BUILD_ID2}
22
27
docker tag ${TAG} :${COMMIT_SHA} ${TAG} :latest
23
- docker push ${TAG} :${BUILD_ID}
24
- docker push ${TAG} :${BUILD_ID2}
25
- docker push ${TAG} :latest
28
+
29
+ if [ $DRY_RUN -eq 0 ]; then
30
+ docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
31
+ docker push ${TAG} :${BUILD_ID}
32
+ docker push ${TAG} :${BUILD_ID2}
33
+ docker push ${TAG} :latest
34
+ fi
You can’t perform that action at this time.
0 commit comments