File tree Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Build Nightly Rust
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 2 * * 3'
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - run : |
14+ make build
15+ make test
16+ env:
17+ RUST_VERSION: nightly
18+ TAG: nightly
19+ IMAGE: 'rustserverless/lambda-rust:nightly'
20+ publish :
21+ needs : [test]
22+ if : github.repository == 'rust-serverless/lambda-rust'
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v2
26+ - run : make publish
27+ env :
28+ RUST_VERSION : nightly
29+ TAG : nightly
30+ create_issue :
31+ runs-on : ubuntu-latest
32+ needs : [publish]
33+ if : always() && (needs.publish.result == 'failure')
34+ steps :
35+ - run : gh issue create --title "Nightly publication failed" --body "Nightly publication failed" --label "bug" -R $GITHUB_REPOSITORY
36+ env :
37+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
38+
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ DOCKER ?= docker
22INPUT_RELEASE_VERSION ?= 0.4.0
33RUST_VERSION ?= 1.55.0
44REPO ?= rustserverless/lambda-rust
5+ TAG ?= latest
56
67publish : build
7- $(DOCKER ) push $(REPO ) :latest
8+ $(DOCKER ) push $(REPO ) :${TAG}
89
910publish-tag : build publish
10- $(DOCKER ) tag $(REPO ) :latest " $( REPO) :$( INPUT_RELEASE_VERSION) -rust-$( RUST_VERSION) "
11+ $(DOCKER ) tag $(REPO ) :${TAG} " $( REPO) :$( INPUT_RELEASE_VERSION) -rust-$( RUST_VERSION) "
1112 $(DOCKER ) push " $( REPO) :$( INPUT_RELEASE_VERSION) -rust-$( RUST_VERSION) "
1213
1314build :
14- $(DOCKER ) build --build-arg RUST_VERSION=$(RUST_VERSION ) -t $(REPO ) :latest .
15+ $(DOCKER ) build --build-arg RUST_VERSION=$(RUST_VERSION ) -t $(REPO ) :${TAG} .
1516
1617test :
1718 @tests/test.sh
@@ -23,4 +24,4 @@ debug: build
2324 -v ${HOME} /.cargo/registry:/cargo/registry \
2425 -v ${HOME} /.cargo/git:/cargo/git \
2526 --entrypoint=/bin/bash \
26- $(REPO )
27+ $(REPO ) : $( TAG )
Original file line number Diff line number Diff line change 44HERE=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
55# Root directory of the repository
66DIST=$( cd " $HERE " /..; pwd)
7- IMAGE= ${1 :- rustserverless/ lambda-rust}
7+ : " ${IMAGE := rustserverless/ lambda-rust}"
88
99source " ${HERE} " /bashtest.sh
1010
You can’t perform that action at this time.
0 commit comments