File tree Expand file tree Collapse file tree 5 files changed +54
-25
lines changed Expand file tree Collapse file tree 5 files changed +54
-25
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7- tags :
8- - ' v**'
9- pull_request :
10- branches :
11- - master
127
138jobs :
149 test :
1712 - uses : actions/checkout@v1
1813 - name : Test
1914 run : make test
20- publish-docs :
21- needs : [test]
22- runs-on : ubuntu-latest
23- steps :
24- - uses : actions/checkout@v1
25- - name : Update Docker hub metadata
26- uses : docker://mpepping/docker-hub-metadata-github-action
27- env :
28- IMAGE : ${{ github.repository }}
29- DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
30- DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
31- continue-on-error : true
3215 publish :
3316 needs : [test]
3417 runs-on : ubuntu-latest
3720 - name : Build
3821 shell : bash
3922 run : make build
40- - name : Publish
41- if : startsWith(github.ref, 'refs/tags/')
23+ - name : Publish Latest
4224 shell : bash
4325 run : |
4426 echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
Original file line number Diff line number Diff line change 1+ name : Release publishing
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ jobs :
9+ publish-docs :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v1
13+ - name : Update Docker hub metadata
14+ uses : docker://mpepping/docker-hub-metadata-github-action
15+ env :
16+ IMAGE : rustserverless/lambda-rust
17+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
18+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
19+ continue-on-error : true
20+ publish :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@v1
24+ - name : Build
25+ shell : bash
26+ run : make build
27+ - name : Publish
28+ shell : bash
29+ with :
30+ release_tag : ${{ github.event.release.tag_name }}
31+ run : |
32+ echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
33+ make publish-tag
Original file line number Diff line number Diff line change 1+ name : Untrusted workflows (PRs)
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v1
13+ - name : Test
14+ run : make test
Original file line number Diff line number Diff line change 11DOCKER ?= docker
2- VERSION ?= 0.4.0
32RUST_VERSION ?= 1.54.0
43REPO ?= rustserverless/lambda-rust
5- TAG ?= "$(REPO ) :$(VERSION ) -rust-$(RUST_VERSION ) "
64
75publish : build
8- $(DOCKER ) push $(TAG )
96 $(DOCKER ) push $(REPO ) :latest
107
8+ publish-tag : build publish
9+ $(DOCKER ) tag $(REPO ) :latest " $( REPO) :$( INPUT_RELEASE_VERSION) -rust-$( RUST_VERSION) "
10+ $(DOCKER ) push " $( REPO) :$( INPUT_RELEASE_VERSION) -rust-$( RUST_VERSION) "
11+
1112build :
12- $(DOCKER ) build --build-arg RUST_VERSION=$(RUST_VERSION ) -t $(TAG ) .
13- $(DOCKER ) tag $(TAG ) $(REPO ) :latest
13+ $(DOCKER ) build --build-arg RUST_VERSION=$(RUST_VERSION ) -t $(REPO ) :latest .
1414
1515test :
1616 @tests/test.sh
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:- softprops / lambda-rust}
7+ IMAGE=${1:- rustserverless / lambda-rust}
88
99source " ${HERE} " /bashtest.sh
1010
You can’t perform that action at this time.
0 commit comments