-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch to github actions for ci in PRs * add test to pr ci, remove azure pipeline * fix env var * fix env var * fix env in ci * fix env * fix env * fix env * add test step back * fix test permissions * new line * update readme * fix missing var * adding release configuration * update readme, adjust manual execution of build * fix comment, new line * update readme with better release instructions
- Loading branch information
1 parent
89631f0
commit 4126d22
Showing
7 changed files
with
108 additions
and
44 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,35 @@ | ||
|
||
# build the image on PRs and master | ||
|
||
name: PR | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'README.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
COMMIT_HASH: ${{ github.sha }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- uses: nelonoel/[email protected] | ||
|
||
- name: Docker Login | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | ||
|
||
- name: Build | ||
env: | ||
BUILD_VERSION: ${{ env.COMMIT_HASH }} | ||
run: make build |
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,47 @@ | ||
# Build, Tag & Push a new release to dockerhub off of a tag | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- uses: nelonoel/[email protected] | ||
|
||
- name: Docker Login | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | ||
|
||
- name: Create Version | ||
id: version | ||
run: | | ||
# TODO: find a better way to version from tags | ||
# Strip git ref prefix from version | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
# Strip "v" prefix from tag name | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
# set to output var | ||
echo ::set-output name=VERSION::${VERSION} | ||
- name: Build and Tag | ||
env: | ||
BUILD_VERSION: ${{ steps.version.outputs.VERSION }} | ||
run: make tag-latest | ||
|
||
- name: Push | ||
if: success() | ||
env: | ||
BUILD_VERSION: ${{ steps.version.outputs.VERSION }} | ||
run: make push-latest |
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
This file was deleted.
Oops, something went wrong.
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
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
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