Create main.yml

action to create docker image
This commit is contained in:
LukasBuecherl 2022-01-18 12:42:37 -07:00 committed by GitHub
parent 82c020dddb
commit 49892df720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

27
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,27 @@
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