File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload illustrations to S3
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ types : [closed]
7+
8+ jobs :
9+ upload :
10+ if : github.event.pull_request.merged == true
11+ runs-on : ubuntu-latest
12+ permissions :
13+ id-token : write
14+ contents : read
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Check version is next release
19+ run : |
20+ REPO_VERSION=$(cat VERSION | tr -d '[:space:]')
21+ PROD_VERSION=$(curl -s https://reactome.org/ContentService/data/database/version | tr -d '[:space:]')
22+ EXPECTED_VERSION=$((PROD_VERSION + 1))
23+
24+ echo "Repo VERSION: $REPO_VERSION"
25+ echo "Production version: $PROD_VERSION"
26+ echo "Expected next version: $EXPECTED_VERSION"
27+
28+ if [ "$REPO_VERSION" != "$EXPECTED_VERSION" ]; then
29+ echo "::error::VERSION ($REPO_VERSION) does not match expected next release ($EXPECTED_VERSION). Skipping upload."
30+ exit 1
31+ fi
32+
33+ echo "VERSION=$REPO_VERSION" >> $GITHUB_ENV
34+
35+ - uses : aws-actions/configure-aws-credentials@v4
36+ with :
37+ role-to-assume : ${{ vars.AWS_ROLE }}
38+ aws-region : us-east-1
39+
40+ - name : Upload icons to S3
41+ run : |
42+ aws s3 sync icons/ "s3://${{ vars.S3_BUCKET }}/${{ env.VERSION }}/icons/svg/" \
43+ --delete
44+
45+ - name : Upload EHLDs to S3
46+ run : |
47+ aws s3 sync ehld/ "s3://${{ vars.S3_BUCKET }}/${{ env.VERSION }}/ehld/" \
48+ --delete
You can’t perform that action at this time.
0 commit comments