This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
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 #681 from rashley-iqt/gh-actions
fix: Move from travis ci to github actions
- Loading branch information
Showing
3 changed files
with
42 additions
and
30 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,33 @@ | ||
name: Docker Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
buildx: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
- name: Change for master | ||
id: change_version | ||
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "master" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1.0.5 | ||
with: | ||
version: latest | ||
|
||
- name: Build | ||
env: | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
run: | | ||
docker buildx build \ | ||
-t cyberreboot/crviz:${{ steps.change_version.outputs.VERSION }} . | ||
docker buildx build \ | ||
-f Dockerfile.gh \ | ||
-t cyberreboot/crviz-gh:${{ steps.change_version.outputs.VERSION }} . | ||
if: github.repository == 'cyberreboot/crviz' |
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.