Files
concrete/.github/workflows/docker.yml
Ayoub Benaissa 812268000c CI: docker image workflow
build and push whenever the docker file has changed. Push with two tags, latest, and commit's hash
2021-07-22 15:32:44 +02:00

32 lines
775 B
YAML

name: Docker image
on:
push:
paths:
- builders/Dockerfile.mlir-env
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_publish:
name: Build & Publish the Docker image
runs-on: ubuntu-latest
env:
IMAGE: qbozama/mlir
steps:
- uses: actions/checkout@v2
- name: build
run: docker build -t $IMAGE -f builders/Dockerfile.mlir-env .
- name: login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_LOGIN }} --password-stdin
- name: tag and publish
run: |
docker tag $IMAGE $IMAGE:${{ github.sha }}
docker push $IMAGE:latest
docker push $IMAGE:${{ github.sha }}