-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from vulcanize/ci-fix
Fix Github Actions
- Loading branch information
Showing
4 changed files
with
97 additions
and
65 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,38 @@ | ||
name: Test and build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 15.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run test:ganache & | ||
- run: npm run test:start & | ||
- run: sleep 10 && npm test | ||
build: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: vars | ||
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) | ||
- name: Run docker build | ||
run: docker build -t vulcanize/testing-framework -f Dockerfile . | ||
- name: Tag docker image | ||
run: docker tag vulcanize/testing-framework docker.pkg.github.com/vulcanize/testing-framework/testing-framework:${{steps.vars.outputs.sha}} | ||
- name: Docker Login | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin | ||
- name: Docker Push | ||
run: docker push docker.pkg.github.com/vulcanize/testing-framework/testing-framework:${{steps.vars.outputs.sha}} |
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,32 @@ | ||
name: Test and build | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 15.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run test:ganache & | ||
- run: npm run test:start & | ||
- run: sleep 10 && npm test | ||
build: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: vars | ||
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) | ||
- name: Run docker build | ||
run: docker build -t vulcanize/testing-framework -f Dockerfile . |
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,27 @@ | ||
name: Publish docker image | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
|
||
release: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get the version | ||
id: vars | ||
run: | | ||
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) | ||
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) | ||
- name: Docker Login to Github Registry | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin | ||
- name: Docker Pull | ||
run: docker pull docker.pkg.github.com/vulcanize/testing-framework/testing-framework:${{steps.vars.outputs.sha}} | ||
- name: Docker Login to Docker Registry | ||
run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u vulcanizejenkins --password-stdin | ||
- name: Tag docker image | ||
run: docker tag docker.pkg.github.com/vulcanize/testing-framework/testing-framework:${{steps.vars.outputs.sha}} vulcanize/testing-framework:${{steps.vars.outputs.tag}} | ||
- name: Docker Push to Docker Hub | ||
run: docker push vulcanize/testing-framework:${{steps.vars.outputs.tag}} |
This file was deleted.
Oops, something went wrong.