Update README.md #40
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: sv-gen Docker build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
schedulers: ["gridengine", "slurm"] | |
env: | |
REGISTRY: ghcr.io | |
GIT_COMMIT: "cb57bbf" | |
TAG: "1.1.0" | |
NAME: sv-gen-${{ matrix.schedulers }} | |
FILE_PATH: sv-gen/${{ matrix.schedulers }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Log into registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Docker image name | |
run: | | |
echo "IMG_TAG=${REGISTRY}/${GITHUB_REPOSITORY_OWNER,,}/${NAME}:${TAG}" >> ${GITHUB_ENV} | |
- name: Build Docker image | |
run: | | |
docker build --build-arg GIT_COMMIT=$GIT_COMMIT -t $IMG_TAG $FILE_PATH | |
docker images | |
- name: Push Docker image to registry | |
run: docker push $IMG_TAG |