This repository was archived by the owner on Jun 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 6
6
- ' main'
7
7
schedule :
8
8
- cron : ' 0 0 * * *'
9
+ workflow_dispatch :
9
10
jobs :
10
11
build-nightly :
11
12
runs-on : ubuntu-22.04
15
16
steps :
16
17
- uses : aws-actions/configure-aws-credentials@v2
17
18
with :
18
- role-to-assume : arn:aws:iam::498127099666:role/WebIdentity-nm-github-actions-only
19
+ role-to-assume : ${{ secrets.AWS_WEBIDENTITY_FOR_GITHUB_ACTIONS }}
19
20
aws-region : us-east-1
20
21
- uses : actions/checkout@v3
21
22
- run : |
29
30
make -B build
30
31
deactivate
31
32
ls dist/
32
- aws s3 ls s3://nm-github-actions/
33
- aws s3 cp dist/*nightly*.whl s3://nm-github-actions/transformers/
33
+ aws s3 cp dist/*nightly*.whl s3://nm-github-actions/${{ github.event.repository.name }}/
34
+ todaytime=`date +%Y%m%d`
35
+ date '+%Y%m%d-%k:%M:%S' | tee log_${GITHUB_REF_NAME}_nightly_${todaytime}_${GITHUB_SHA:0:7}
36
+ aws s3 cp log_${GITHUB_REF_NAME}_nightly_${todaytime}_${GITHUB_SHA:0:7} s3://nm-github-actions/${{ github.event.repository.name }}/
37
+ oldDate=`date --date='-2 month' +%Y%m%d`
38
+ oldWhl=`(aws s3 ls s3://nm-github-actions/${{ github.event.repository.name }}/ | grep nightly | grep "${oldDate}") || echo "notfound"`
39
+ if [[ "${oldWhl}" != 'notfound' ]]; then
40
+ echo "Remove old build ${oldWhl}"
41
+ aws s3 rm s3://nm-github-actions/${{ github.event.repository.name }}/${oldWhl}
42
+ fi
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- ' release/[0-9]+.[0-9]+'
7
-
7
+ workflow_dispatch :
8
8
jobs :
9
9
build-release :
10
10
runs-on : ubuntu-22.04
14
14
steps :
15
15
- uses : aws-actions/configure-aws-credentials@v2
16
16
with :
17
- role-to-assume : arn:aws:iam::498127099666:role/WebIdentity-nm-github-actions-only
17
+ role-to-assume : ${{ secrets.AWS_WEBIDENTITY_FOR_GITHUB_ACTIONS }}
18
18
aws-region : us-east-1
19
19
- uses : actions/checkout@v3
20
20
- run : |
25
25
virtualenv venv
26
26
source venv/bin/activate
27
27
pip install -e .
28
- sed -i 's/is_release = False/is_release = True/g' src/transformers /version.py
28
+ sed -i 's/is_release = False/is_release = True/g' src/${{ github.event.repository.name }} /version.py
29
29
make -B build
30
30
deactivate
31
31
ls dist/
32
- aws s3 ls s3://nm-github-actions/
33
- aws s3 cp dist/*.whl s3://nm-github-actions/transformers/
32
+ aws s3 cp dist/*.whl s3://nm-github-actions/${{ github.event.repository.name }}/
33
+ todaytime=`date +%Y%m%d`
34
+ date '+%Y%m%d-%k:%M:%S' | tee log_${GITHUB_REF_NAME}_release_${todaytime}_${GITHUB_SHA:0:7}
35
+ aws s3 cp log_${GITHUB_REF_NAME}_release_${todaytime}_${GITHUB_SHA:0:7} s3://nm-github-actions/${{ github.event.repository.name }}/
You can’t perform that action at this time.
0 commit comments