-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (36 loc) · 1.27 KB
/
newRelease.yml
File metadata and controls
39 lines (36 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: new Release
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and Push Container Image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
dockerfile: Dockerfile
repository: ${{ secrets.REGISTRY_USER }}/${{ github.event.repository.name }}
tag_with_ref: true
tag_with_sha: true
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Add TAG_NAME env property
run: echo "TAG_NAME=`echo ${GITHUB_REF#refs/tags/}`" >> $GITHUB_ENV
- name: Open PR in Environment Repository for new App Version
env:
ENV_REPO: ${{ github.event.repository.owner.name }}/example-environment
uses: benc-uk/workflow-dispatch@v1.1
with:
workflow: New Application Version
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
inputs: '{"tag_name": "${{ env.TAG_NAME }}", "app_repo": "${{ github.event.repository.name }}", "image": "${{ github.event.repository.full_name }}:${{ env.TAG_NAME }}"}'
ref: refs/heads/main
repo: ${{ env.ENV_REPO }}