-
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
d67c601
commit df6ac9a
Showing
4 changed files
with
43 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and push | ||
description: Build and push Docker images to Docker Hub | ||
|
||
inputs: | ||
environment: | ||
description: "Environment to build images for" | ||
required: true | ||
service: | ||
description: "Service to build and push" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check inputs | ||
shell: bash | ||
if: ${{ inputs.environment != 'dev' && inputs.environment != 'prod' }} | ||
run: echo "Wrong environment. Expected 'dev' or 'prod', got '${{ inputs.environment }}'" && exit 1 | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push backend image | ||
shell: bash | ||
run: | | ||
docker build -t healthcheck-${{ matrix.service }}:${{ inputs.environment }} ${{ matrix.service }} | ||
docker push healthcheck-${{ matrix.service }}:${{ inputs.environment }} |
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
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
This file was deleted.
Oops, something went wrong.