refactor code to recompute_all_queries(); add temporary informative e… #24
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 Build & Push | |
on: | |
push: | |
branches: | |
- dev_sct_trud | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set image tag name | |
id: image_tag | |
run: | | |
# tag name | |
TAG_BASE="rmgpanw/codeminer" | |
TAG_NAME="${TAG_BASE}:$(sed -n 's/Version: //p' DESCRIPTION)" | |
TAG_NAME_DEV="${TAG_NAME}-dev" | |
echo "::set-output name=tag_base::${TAG_BASE}" | |
echo "::set-output name=tag_name::${TAG_NAME}" | |
echo "::set-output name=tag_name_dev::${TAG_NAME_DEV}" | |
- name: Build and push latest | |
uses: docker/build-push-action@v5 | |
if: github.ref == 'refs/heads/main' | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.image_tag.outputs.tag_name }} , ${{ steps.image_tag.outputs.tag_base }}:latest | |
cache-from: type=registry,ref=${{ steps.image_tag.outputs.tag_name }} | |
cache-to: type=inline | |
- name: Build and push dev | |
uses: docker/build-push-action@v5 | |
if: github.ref == 'refs/heads/dev_sct_trud' | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.image_tag.outputs.tag_name_dev }} | |
cache-from: type=registry,ref=${{ steps.image_tag.outputs.tag_name_dev }} | |
cache-to: type=inline | |
# If using a larger base image, use this (run earlier in the workflow): | |
# Use github actions https://github.com/marketplace/actions/free-disk-space-ubuntu | |
# See also SO post: https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 | |
# - name: Free Disk Space (Ubuntu) | |
# uses: jlumbroso/free-disk-space@main | |
# with: | |
# # this might remove tools that are actually needed, | |
# # if set to "true" but frees about 6 GB | |
# tool-cache: false | |
# | |
# # all of these default to true, but feel free to set to | |
# # "false" if necessary for your workflow | |
# android: true | |
# dotnet: true | |
# haskell: true | |
# large-packages: true | |
# swap-storage: true |