Build from Dockerfile and push to Snowflake #3
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: Build from Dockerfile and push to Snowflake | |
on: | |
workflow_dispatch: # Run manually only | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Mask repo-related values in Github logs | |
run: | | |
IFS='/' read -ra URL_PARTS <<< "${{ secrets.REGISTRY_URL }}" | |
for i in "${URL_PARTS[@]}"; do | |
echo "::add-mask::$i" | |
done | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Snowflake image registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.REGISTRY_URL }} | |
username: ${{ secrets.SNOWFLAKE_USER }} | |
password: ${{ secrets.SNOWFLAKE_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: "{{defaultContext}}:non-nix" | |
push: true | |
tags: ${{ secrets.REGISTRY_URL }}/ttydcontainer:latest |