From bfaa6277f0569dc684c277903b1c9db62d4285b4 Mon Sep 17 00:00:00 2001 From: Kamesh Sampath Date: Fri, 29 Nov 2024 13:51:07 +0530 Subject: [PATCH 1/3] (fix): workflow update to use right Dockerfile --- .github/workflows/slack-bot.yml | 1 + .github/workflows/snow-config.yml | 1 + Dockerfile => Dockerfile.bot | 0 docker-compose.yml | 4 ++-- 4 files changed, 4 insertions(+), 2 deletions(-) rename Dockerfile => Dockerfile.bot (100%) diff --git a/.github/workflows/slack-bot.yml b/.github/workflows/slack-bot.yml index f72d1c3..5037646 100644 --- a/.github/workflows/slack-bot.yml +++ b/.github/workflows/slack-bot.yml @@ -90,3 +90,4 @@ jobs: PYTHON_TAG=${{ matrix.tag-suffix }} cache-from: type=gha cache-to: type=gha,mode=max + file: Dockerfile.bot diff --git a/.github/workflows/snow-config.yml b/.github/workflows/snow-config.yml index 6935954..70e4259 100644 --- a/.github/workflows/snow-config.yml +++ b/.github/workflows/snow-config.yml @@ -90,3 +90,4 @@ jobs: PYTHON_TAG=${{ matrix.tag-suffix }} cache-from: type=gha cache-to: type=gha,mode=max + file: Dockerfile.config diff --git a/Dockerfile b/Dockerfile.bot similarity index 100% rename from Dockerfile rename to Dockerfile.bot diff --git a/docker-compose.yml b/docker-compose.yml index d73be3f..f585eda 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: build: dockerfile: Dockerfile.config context: . - image: ghcr.io/kameshsampath/snowflake_demo_user_setup + image: ghcr.io/kameshsampath/apj-build-2024-slack-demo/snow-config:py-311 user: me volumes: - snowflake_home:/home/me/.snowflake @@ -16,7 +16,7 @@ services: build: dockerfile: Dockerfile context: . - image: ghcr.io/kameshsampath/demomate:build24 + image: ghcr.io/kameshsampath/apj-build-2024-slack-demo/slack-bot:py-311 user: me env_file: - .env.bot From 56da00ba2aa5752060448816673d7246ff8e9f9c Mon Sep 17 00:00:00 2001 From: Kamesh Sampath Date: Fri, 29 Nov 2024 14:21:57 +0530 Subject: [PATCH 2/3] (fix): change pull policy to be always --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index f585eda..257a0b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: dockerfile: Dockerfile.config context: . image: ghcr.io/kameshsampath/apj-build-2024-slack-demo/snow-config:py-311 + pull_policy: always user: me volumes: - snowflake_home:/home/me/.snowflake @@ -17,6 +18,7 @@ services: dockerfile: Dockerfile context: . image: ghcr.io/kameshsampath/apj-build-2024-slack-demo/slack-bot:py-311 + pull_policy: always user: me env_file: - .env.bot From cc673ba88f3cd221955d4b45a28061857b5b578d Mon Sep 17 00:00:00 2001 From: Kamesh Sampath Date: Fri, 29 Nov 2024 14:35:54 +0530 Subject: [PATCH 3/3] (fix): lowercase repo name --- .github/workflows/slack-bot.yml | 4 ++++ .github/workflows/snow-config.yml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slack-bot.yml b/.github/workflows/slack-bot.yml index 5037646..de419c1 100644 --- a/.github/workflows/slack-bot.yml +++ b/.github/workflows/slack-bot.yml @@ -56,6 +56,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set lowercase image name + run: | + echo "IMAGE_NAME=$(echo ${{ github.repository }}/slack-bot | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5 diff --git a/.github/workflows/snow-config.yml b/.github/workflows/snow-config.yml index 70e4259..8a68a3b 100644 --- a/.github/workflows/snow-config.yml +++ b/.github/workflows/snow-config.yml @@ -23,7 +23,6 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}/snow-config jobs: build-and-push: @@ -56,6 +55,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set lowercase image name + run: | + echo "IMAGE_NAME=$(echo ${{ github.repository }}/snow-config | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5