-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc7d0ff
commit 4c84563
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,21 +14,21 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Version Environment Variable | ||
env: | ||
VERSION: ${{ github.event_name == 'release' && github.ref == 'refs/tags/v*' && github.event.release.tag_name }} | ||
run: | | ||
# Use GitHub Actions context to set the VERSION environment variable. | ||
if [ -n "$VERSION" ]; then | ||
echo "Version is $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: Build and publish Docker image | ||
run: | | ||
# Build the Docker image with the package version tag. | ||
docker build -t tschissler/testservice:${VERSION} -t tschissler/testservice:latest -f ./TestService/Dockerfile --push . | ||
docker build -t tschissler/testservice:${{ github.sha }} -t tschissler/testservice:latest -f ./TestService/Dockerfile --push . | ||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
|
||
- name: Update Kubernetes deployment | ||
run: | | ||
kubectl set tschissler/testservice your-testservice=tschissler/testservice:${{ steps.bump.outputs.newTag }} | ||
- name: Deploy to Kubernetes | ||
run: microk8s kubectl apply -f /home/thomasschissler/SmartHome/deploy.yaml |