Skip to content

Commit

Permalink
Documentation for building an image with the new GH Action
Browse files Browse the repository at this point in the history
* update readme and comments
  • Loading branch information
tomeindl authored May 6, 2024
1 parent 303278e commit 8e1819d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish image

on:
push:
branches:
branches:
- main
workflow_dispatch:

Expand All @@ -26,12 +26,13 @@ jobs:
${{ runner.os }}-
- uses: nelonoel/[email protected]

- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

#build the image and push it to the registry

#build the image and push it to the registry
- uses: mr-smithers-excellent/docker-build-push@v5
name: push-container-image
with:
Expand All @@ -41,4 +42,5 @@ jobs:
buildArgs: BRANCH=${BRANCH_NAME},COMMIT=${{ steps.vars.outputs.sha_short }},VERSION=${{ steps.vars.outputs.sha_short }}
username: ${{ github.repository }}
password: ${{ secrets.GITHUB_TOKEN }}
# if the branch is main, add the latest tag
addLatest: ${{ github.ref == 'refs/heads/main' }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).


## Building an Image for Deployment

Use the GitHub Action "Build and publish image" to build an image of a selected branch and release it as a package in this repository.
The naming convention for the image is [branch]-[commit-hash]

The action is also triggered automatically when a commit to main occurs.

0 comments on commit 8e1819d

Please sign in to comment.