Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #261 from sarbull/check-for-package-version-updated
Browse files Browse the repository at this point in the history
Check for package-version-updated
  • Loading branch information
sarbull authored Oct 27, 2021
2 parents 676c7dd + 2b5050c commit 2bacc3a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v1
- name: Setup Node.js
uses: actions/setup-node@v2.1.5
with:
Expand All @@ -41,51 +44,54 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
if: ${{ steps.check.outputs.changed == 'true' }}
- name: Login to DockerHub
uses: docker/login-action@v1
if: ${{ steps.check.outputs.changed == 'true' && github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
if: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
- name: Login to container registry (Quay.io)
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_ACCESS_TOKEN }}
if: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
if: ${{ steps.check.outputs.changed == 'true' && github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
# For releases (ie not main) we push the image - but not the latest tag
- name: Build and push (not master merge)
if: github.ref != 'refs/heads/master'
id: docker_build_release
uses: docker/build-push-action@v2
if: ${{ steps.check.outputs.changed == 'true' && github.ref != 'refs/heads/master' }}
with:
push: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
tags: odpi/egeria-ui:${{ steps.package-version.outputs.current-version}}, quay.io/odpi/egeria-ui:${{ steps.package-version.outputs.current-version}}
context: .
file: ./Dockerfile
# For main code stream we push the image and add the latest tag
- name: Build and push (master merge)
if: github.ref == 'refs/heads/master'
id: docker_build_master
uses: docker/build-push-action@v2
if: ${{ steps.check.outputs.changed == 'true' && github.ref == 'refs/heads/master' }}
with:
push: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
tags: odpi/egeria-ui:${{ steps.package-version.outputs.current-version }}, odpi/egeria-ui:latest, quay.io/odpi/egeria-ui:${{ steps.package-version.outputs.current-version }}, quay.io/odpi/egeria-ui:latest
context: .
file: ./Dockerfile
# Note the digest
- name: Image digest (release)
if: github.ref != 'refs/heads/master'
if: ${{ steps.check.outputs.changed == 'true' && github.ref != 'refs/heads/master' }}
run: echo ${{ steps.docker_build_release.outputs.digest }}
- name: Image digest (master)
if: github.ref == 'refs/heads/master'
if: ${{ steps.check.outputs.changed == 'true' && github.ref == 'refs/heads/master' }}
run: echo ${{ steps.docker_build_master.outputs.digest }}
# Save an artifact of the build tree & upload
- name: Create Archive
if: ${{ steps.check.outputs.changed == 'true' }}
run: tar -zcf /tmp/egeria-ui.tar.gz .
- name: Upload
uses: actions/upload-artifact@v2
if: ${{ steps.check.outputs.changed == 'true' }}
with:
name: Egeria UI ${{ steps.package-version.outputs.current-version }}
path: /tmp/egeria-ui.tar.gz
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egeria-ui",
"version": "3.1.0",
"version": "3.1.1",
"description": "Egeria UI application",
"author": "Egeria contributors",
"license": "Apache-2.0",
Expand Down

0 comments on commit 2bacc3a

Please sign in to comment.