-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
194ebe6
commit b11b7f4
Showing
3 changed files
with
102 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,32 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- "Dockerfile" | ||
- "app/**" | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- "Dockerfile" | ||
- "app/**" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- name: Lint Dockerfile using hadolint | ||
uses: burdzwastaken/hadolint-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HADOLINT_ACTION_DOCKERFILE_FOLDER: . | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- name: Build docker image | ||
run: docker 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,42 @@ | ||
name: Build current version + push to DockerHub | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: docker/metadata-action@v3.4.1 | ||
with: | ||
images: wernerfred/docker-nilan-cts700 | ||
tags: | | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{version}} | ||
flavor: | | ||
latest=auto | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1.2.0 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: amd64 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1.5.1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1.10.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} |
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,28 @@ | ||
name: Create GitHub release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
|
||
jobs: | ||
release: | ||
if: github.event.base_ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1.1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NILAN_CTS700 }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: "" | ||
draft: false | ||
prerelease: false |