-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a temporary github action for v2 branch
- Loading branch information
1 parent
df3bf65
commit b2c6af9
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: master build | ||
on: | ||
push: | ||
branches: | ||
- v2 | ||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
# build-tools is built from ../../tools/build-tools.Dockerfile | ||
container: kedacore/build-tools:v2 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Go modules cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: /go/pkg | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Test | ||
run: make test | ||
|
||
- name: Login to Docker Hub | ||
env: | ||
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
run: echo $DOCKER_HUB_ACCESS_TOKEN | docker login -u $DOCKER_HUB_USERNAME --password-stdin | ||
|
||
- name: Publish | ||
run: make publish | ||
|
||
- name: Run end to end tests | ||
env: | ||
AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} | ||
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} | ||
AZURE_SP_ID: ${{ secrets.AZURE_SP_ID }} | ||
AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} | ||
AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} | ||
TEST_STORAGE_CONNECTION_STRING: ${{ secrets.TEST_STORAGE_CONNECTION_STRING }} | ||
run: make e2e-test |