made the publish workflow only run on master

enabled tagging again
This commit is contained in:
Ulf Gebhardt 2021-04-16 20:58:58 +02:00
parent adb2635691
commit f002c8dba1
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -2,8 +2,8 @@ name: gradido publish CI
on: on:
push: push:
# branches: branches:
# - master - master
jobs: jobs:
############################################################################## ##############################################################################
@ -263,71 +263,71 @@ jobs:
- name: Push Nginx - name: Push Nginx
run: docker push --all-tags gradido/nginx run: docker push --all-tags gradido/nginx
# # JOB: GITHUB TAG LATEST VERSION ############################################# # JOB: GITHUB TAG LATEST VERSION #############################################
# ############################################################################## ##############################################################################
# ############################################################################## ##############################################################################
# github_tag: github_tag:
# name: Tag latest version on Github name: Tag latest version on Github
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [upload_to_dockerhub] needs: [upload_to_dockerhub]
# steps: steps:
# ########################################################################## ##########################################################################
# # CHECKOUT CODE ########################################################## # CHECKOUT CODE ##########################################################
# ########################################################################## ##########################################################################
# - name: Checkout code - name: Checkout code
# uses: actions/checkout@v2 uses: actions/checkout@v2
# with: with:
# fetch-depth: 0 # Fetch full History for changelog fetch-depth: 0 # Fetch full History for changelog
# ########################################################################## ##########################################################################
# # SET ENVS ############################################################### # SET ENVS ###############################################################
# ########################################################################## ##########################################################################
# - name: ENV - VERSION - name: ENV - VERSION
# run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
# - name: ENV - BUILD_DATE - name: ENV - BUILD_DATE
# run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
# - name: ENV - BUILD_VERSION - name: ENV - BUILD_VERSION
# run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
# - name: ENV - BUILD_COMMIT - name: ENV - BUILD_COMMIT
# run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
# ########################################################################## ##########################################################################
# # Push version tag to GitHub ############################################# # Push version tag to GitHub #############################################
# ########################################################################## ##########################################################################
# # TODO: this will error on duplicate # TODO: this will error on duplicate
# #- name: package-version-to-git-tag #- name: package-version-to-git-tag
# # uses: pkgdeps/git-tag-action@v2
# # with:
# # github_token: ${{ secrets.GITHUB_TOKEN }}
# # github_repo: ${{ github.repository }}
# # version: ${{ env.VERSION }}
# # git_commit_sha: ${{ github.sha }}
# # git_tag_prefix: "v"
# ##########################################################################
# # Push build tag to GitHub ###############################################
# ##########################################################################
# - name: package-version-to-git-tag + build number
# uses: pkgdeps/git-tag-action@v2 # uses: pkgdeps/git-tag-action@v2
# with: # with:
# github_token: ${{ secrets.GITHUB_TOKEN }} # github_token: ${{ secrets.GITHUB_TOKEN }}
# github_repo: ${{ github.repository }} # github_repo: ${{ github.repository }}
# version: ${{ env.BUILD_VERSION }} # version: ${{ env.VERSION }}
# git_commit_sha: ${{ github.sha }} # git_commit_sha: ${{ github.sha }}
# git_tag_prefix: "b" # git_tag_prefix: "v"
# ########################################################################## ##########################################################################
# # Push release tag to GitHub ############################################# # Push build tag to GitHub ###############################################
# ########################################################################## ##########################################################################
# - name: yarn install - name: package-version-to-git-tag + build number
# run: yarn install uses: pkgdeps/git-tag-action@v2
# - name: generate changelog with:
# run: yarn auto-changelog --latest-version ${{ env.VERSION }} --unreleased-only github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: package-version-to-git-release github_repo: ${{ github.repository }}
# continue-on-error: true # Will fail if tag exists version: ${{ env.BUILD_VERSION }}
# id: create_release git_commit_sha: ${{ github.sha }}
# uses: actions/create-release@v1 git_tag_prefix: "b"
# env: ##########################################################################
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token # Push release tag to GitHub #############################################
# with: ##########################################################################
# tag_name: ${{ env.VERSION }} - name: yarn install
# release_name: ${{ env.VERSION }} run: yarn install
# body_path: ./CHANGELOG.md - name: generate changelog
# draft: false run: yarn auto-changelog --latest-version ${{ env.VERSION }} --unreleased-only
# prerelease: false - name: package-version-to-git-release
continue-on-error: true # Will fail if tag exists
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body_path: ./CHANGELOG.md
draft: false
prerelease: false