27 lines
651 B
YAML
27 lines
651 B
YAML
name: Build and push docker images
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
name: Build image and push to Docker Hub
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
name: Checkout source code
|
|
- name: Build the Docker image
|
|
run: |
|
|
tag="ibiosim:snapshot"
|
|
echo $tag
|
|
docker build . --tag $tag
|
|
- uses: azure/docker-login@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Push the image to Docker Hub
|
|
run: |
|
|
tag="ibiosim:snapshot"
|
|
echo $tag
|
|
docker push $tag
|