forked from sesam-io/sesam-duke-microservice
-
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.
Merge pull request #3 from sesam-community/BaardBouvet-patch-1
Create sesam-community-ci-cd.yml
- Loading branch information
Showing
1 changed file
with
44 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,44 @@ | ||
name: SesamCommunity CI&CD | ||
|
||
on: | ||
pull_request: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.rst' | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
release: | ||
types: [published] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Docker Login | ||
if: startsWith( github.ref, 'refs/tags/') == true || startsWith(github.ref, 'refs/heads/master') == true | ||
uses: docker/#-action@v1.8.0 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker build/push | ||
env: | ||
GITHUB_REPO: ${{ github.repository }} | ||
GITHUB_BASE_REF: ${{ github.base_ref }} | ||
GITHUB_REF: ${{ github.ref }} | ||
GITHUB_SHA: ${{ github.sha }} | ||
GITHUB_RUN_NUMBER: ${{ github.run_number }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
# DOCKER_ORGNAME: define DOCKER_ORGNAME secret to push to organization namespace that DOCKER_USERNAME has access to | ||
DOCKER_ORGNAME: ${{ secrets.DOCKER_ORGNAME }} | ||
# DOCKER_REPO_NAME: uncomment_and_set_to_docker_repo_name_if_different_from_github_repoa_name | ||
run: bash <(curl -s https://raw.githubusercontent.com/sesam-community/guidelines/master/git_action.sh) | ||
shell: bash |