Fixed permission issues when running the exp_workflow in a docker con… #13
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
name: Docker Image CI | |
on: | |
push: | |
paths: | |
- 'Dockerfile' | |
- 'requirements.txt' | |
- '.github/workflows/docker_image.yml' | |
# tags: | |
# - 'v*.*.*' | |
pull_request: | |
paths: | |
- 'Dockerfile' | |
- 'requirements.txt' | |
- '.github/workflows/docker_image.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Load Environment Variables from global.env | |
run: | | |
grep -v '^#' global.env | grep '=' | while IFS='=' read -r key value; do | |
if [[ -n "$key" && -n "$value" ]]; then | |
echo "$key=$value" >> $GITHUB_ENV | |
fi | |
done | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/${{ env.TUSTU_PROJECT_NAME }}-image:latest |