Skip to content

Commit

Permalink
Registry version from file (#73)
Browse files Browse the repository at this point in the history
* Added registry version file

* Read registry version from file if it exists other way build registry from master
  • Loading branch information
keijoraamat authored Aug 23, 2021
1 parent 96aea9c commit e1a49fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/build_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:

- uses: actions/checkout@v2

- name: Set variables
run: |
echo "REGISTRY_VERSION_FILE=staging_registry_version" >> $GITHUB_ENV
- name: Set image tag
run: |
SHORT_SHA=$(echo $GITHUB_SHA | cut -c 1-7) #pr-s test commit of merged state
Expand Down Expand Up @@ -60,8 +64,19 @@ jobs:
- name: Clone registry project
run: |
git clone https://github.com/internetee/registry.git
- name: Check registry version file
id: check_files
uses: andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673
with:
files: "staging_registry_version"

- name: Checkout specific registry
if: steps.check_files.outputs.files_exists == 'true'
run: |
REGISTRY_VERSION=`(cat $REGISTRY_VERSION_FILE)`
cd registry
git checkout implement-api-endpoint-for-login-info
git checkout $REGISTRY_VERSION
- name: Build registry image
env:
Expand Down
1 change: 1 addition & 0 deletions staging_registry_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implement-api-endpoint-for-login-info

0 comments on commit e1a49fb

Please sign in to comment.