diff --git a/.github/workflows/snigdhaos-docker.yml b/.github/workflows/snigdhaos-docker.yml index cca7365..d5872eb 100644 --- a/.github/workflows/snigdhaos-docker.yml +++ b/.github/workflows/snigdhaos-docker.yml @@ -6,7 +6,7 @@ on: - cron: '30 05 * * *' # Cron schedule for automatic builds (adjust as needed) push: branches: - - 'master' + - master jobs: docker: @@ -45,16 +45,17 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v4 with: - context: . + context: ./snigdhaos # Update context to the snigdhaos directory push: true - tags: snigdhaos/snigdhaos:latest + tags: | + snigdhaos/snigdhaos:latest platforms: linux/amd64,linux/arm64 # Support for multiple architectures - cache-from: type=registry,ref=snigdhaos/snigdhaos:latest # Enable cache from Docker registry + cache-to: type=inline # Improved caching mechanism + cache-from: type=registry,ref=snigdhaos/snigdhaos:latest # Optionally, tag the build with a version from GitHub - name: Tag Docker image with version run: | - VERSION=$(git describe --tags --abbrev=0) + VERSION=$(git describe --tags --abbrev=0 || echo "latest") docker tag snigdhaos/snigdhaos:latest snigdhaos/snigdhaos:${VERSION} docker push snigdhaos/snigdhaos:${VERSION} -