Merge branch 'main' of github.com:ovvesley/akoflow #1
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
name: Build and Push Image to Docker Hub on push to main branch | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build Docker image Server | |
run: docker build . -t ovvesley/akoflow-server:latest -t ovvesley/akoflow-server:$(git rev-parse --short $GITHUB_SHA) -f server.Dockerfile | |
- name: Build Docker image Preactivity | |
run: docker build pkg/server/preactivity -t ovvesley/akoflow-preactivity:latest -t ovvesley/akoflow-preactivity:$(git rev-parse --short $GITHUB_SHA) -f preactivity.Dockerfile | |
- name: Login to Docker Hub | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
- name: Push Docker image Server | |
run: docker push ovvesley/akoflow-server:latest && docker push ovvesley/akoflow-server:$(git rev-parse --short $GITHUB_SHA) | |
- name: Push Docker image Preactivity | |
run: docker push ovvesley/akoflow-preactivity:latest && docker push ovvesley/akoflow-preactivity:$(git rev-parse --short $GITHUB_SHA) |