revert changes which shouldn't be merged to master #4
This file contains hidden or 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: ci_argocd_docker | |
| on: | |
| push: | |
| paths: | |
| - apps/hasadna-argocd/docker/** | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| DOCKER_APP_IMAGE_NAME: "ghcr.io/hasadna/hasadna-k8s/hasadna-argocd" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| echo "${GITHUB_TOKEN}" | docker login ghcr.io -u hasadna --password-stdin &&\ | |
| if docker pull "${DOCKER_APP_IMAGE_NAME}:latest"; then | |
| CACHE_FROM_ARG="--cache-from ${DOCKER_APP_IMAGE_NAME}:latest" | |
| else | |
| CACHE_FROM_ARG="" | |
| fi &&\ | |
| docker build $CACHE_FROM_ARG --build-arg VERSION=${GITHUB_SHA} -t app apps/hasadna-argocd/docker &&\ | |
| docker tag app "${DOCKER_APP_IMAGE_NAME}:${GITHUB_SHA}" &&\ | |
| docker push "${DOCKER_APP_IMAGE_NAME}:${GITHUB_SHA}" &&\ | |
| if [ "${GITHUB_REF}" == "refs/heads/master" ]; then | |
| docker tag app "${DOCKER_APP_IMAGE_NAME}:latest" &&\ | |
| docker push "${DOCKER_APP_IMAGE_NAME}:latest" | |
| fi |