-
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
Showing
2 changed files
with
67 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,27 @@ | ||
name: Dev Build to Dockerhub | ||
|
||
on: | ||
create: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the Tagged version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
- name: Create and Build Dockercontainer | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
tags: transentis/sim-covid-dashbiard:${{ steps.get_version.outputs.VERSION }} | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Push Dockercontainer | ||
run: docker push transentis/sim-covid-dashbiard:${{ steps.get_version.outputs.VERSION }} |
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,40 @@ | ||
name: Create new Minor Version | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event.pull_request.merged }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: 'WyriHaximus/github-action-get-previous-tag@v1' | ||
with: | ||
fallback: 1.0.0 | ||
- name: 'Get next minor version' | ||
id: nextVersion | ||
uses: 'WyriHaximus/github-action-next-semvers@v1' | ||
with: | ||
version: ${{ steps.previoustag.outputs.tag }} | ||
- name: Print Version | ||
run: echo ${{ steps.nextVersion.outputs.patch }} | ||
- name: Commit files | ||
run: | | ||
git config --local user.email "minetoaster12@gmail.com" | ||
git config --local user.name "Makisuo" | ||
- name: Create new Version | ||
run: yarn version --new-version ${{ steps.nextVersion.outputs.patch }} | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.PERSONAL_GITHUB }} | ||
branch: ${{ github.ref }} |