Skip to content

Commit

Permalink
Add things
Browse files Browse the repository at this point in the history
  • Loading branch information
Makisuo committed Feb 7, 2022
1 parent 92f84bd commit 30d8793
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/buildContainer.yml
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 }}
40 changes: 40 additions & 0 deletions .github/workflows/createVersion.yml
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 }}

0 comments on commit 30d8793

Please sign in to comment.