Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lxRbckl committed Jan 23, 2024
1 parent f1161f0 commit 412bca0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Push Docker Image


on:
push:
branches:
- Project-Heimir-2


jobs:
build:
runs-on: ubuntu-latest

env:
DOCKERPROJECT: "project-heimir"

steps:
- name: Evaluate Commit Message
run: |
commitMessage="${{ github.event.head_commit.message }}";
if [ "$commitMessage" != "Update" ]; then
echo "Cancelling Workflow.";
exit 1;
fi
- name: Checkout Repository
uses: actions/checkout@v2

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUBUSERNAME }}
password: ${{ secrets.DOCKERHUBTOKEN }}

- name: Build and Push Docker Image
run: |
docker build -t ${{ env.DOCKERPROJECT }} .
docker tag ${{ env.DOCKERPROJECT }} ${{ secrets.DOCKERHUBUSERNAME }}/${{ env.DOCKERPROJECT }}:latest
docker push ${{ secrets.DOCKERHUBUSERNAME }}/${{ env.DOCKERPROJECT }}:latest

0 comments on commit 412bca0

Please sign in to comment.