Merge pull request #79 from wp-media/develop #9
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
name: group.one Deployment Production v2 | |
concurrency: deployment | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://wpm-tbtt.default.live1-k8s-cph3.one.com/ | |
steps: | |
- name: Check out private action repo | |
uses: actions/checkout@v3 | |
with: | |
repository: wp-media/group.one-deploy-action | |
ref: master | |
token: ${{ secrets.DEPLOY_ACTION_PAT }} | |
path: ./.github/actions/group.one-deploy-action | |
- name: Create date release tag | |
id: create_tag | |
run: echo ::set-output name=VERSION::$(echo $(date '+%Y.%m.%d-%H%M')) | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
name: ${{ steps.create_tag.outputs.VERSION }} | |
tag_name: v${{ steps.create_tag.outputs.VERSION }} | |
body: ${{ github.event.head_commit.message }} | |
target_commitish: master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
- name: Deploy to production | |
id: deploy | |
uses: ./.github/actions/group.one-deploy-action/ | |
with: | |
application: wpm-tbtt | |
environment: production | |
token: ${{ secrets.DEPLOY_PROXY_TOKEN }} |