Skip to content

Replace replace jsonnet with go-jsonnet #27

Replace replace jsonnet with go-jsonnet

Replace replace jsonnet with go-jsonnet #27

#
# Copyright 2020 The dNation Jsonnet Translator Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Tag code for docker image to release
on:
push:
branches:
- main
# Only if there are changes to release.
paths:
- 'docker/Dockerfile'
- 'translator/**'
- 'setup.py'
- 'default_config.yaml'
jobs:
tag:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Get docker image code version
id: version
run: |
version=$(grep 'LABEL Version=' docker/Dockerfile | sed 's/LABEL Version="\(.*\)".*/\1/')
echo "::set-output name=version::$version"
- name: Get helm chart application version
id: helm-app-version
run: |
app=$(grep "appVersion" chart/Chart.yaml | head -1 | awk '{print $2}')
echo "::set-output name=app-version::$app"
- name: Check if helm chart application version equals docker version
uses: nick-invision/assert-action@v1
with:
expected: ${{ steps.version.outputs.version }}
actual: ${{ steps.helm-app-version.outputs.app-version }}
- name: Configure Git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
- name: Tag branch
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.CICD_TOKEN }}
CUSTOM_TAG: 'image-v${{ steps.version.outputs.version }}'
RELEASE_BRANCHES: main