Multiple queues for a task #19
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 Compose Build and Push prod image | |
on: | |
push: | |
branches: | |
- main # or any other branch you want to trigger the action on | |
env: | |
REGISTRY_URL: https://registry.biocomputingup.it | |
IMAGE_NAME: registry.biocomputingup.it/drmaatic/drmaatic | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Login to private Docker registry | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin "$REGISTRY_URL" | |
- name: Build and push Docker image | |
run: | | |
docker build --tag $IMAGE_NAME:latest -f docker/deploy/Dockerfile . | |
docker push $IMAGE_NAME:latest | |
VERSION=$(git describe --always) | |
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$VERSION | |
docker push $IMAGE_NAME:$VERSION |