Create main.yml
action to create docker image
This commit is contained in:
parent
82c020dddb
commit
49892df720
1 changed files with 27 additions and 0 deletions
27
.github/workflows/main.yml
vendored
Normal file
27
.github/workflows/main.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue