Skip to content

dormant

dormant #24

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- Project-JA-3
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKERPROJECT: "project-ja"
architecture: "linux/arm64"
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