diff --git a/.github/workflows/buildContainer.yml b/.github/workflows/buildContainer.yml new file mode 100644 index 0000000..7246535 --- /dev/null +++ b/.github/workflows/buildContainer.yml @@ -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 }} diff --git a/.github/workflows/createVersion.yml b/.github/workflows/createVersion.yml new file mode 100644 index 0000000..9014785 --- /dev/null +++ b/.github/workflows/createVersion.yml @@ -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 }}