Skip to content

Commit

Permalink
update dockerignore and deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
randallard committed Dec 30, 2024
1 parent 180afff commit 6619465
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
35 changes: 26 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
# flyctl launch added from .gitignore
target
examples\web-demo\target
examples\cli\target
# Git
.git
.gitignore
.github/

# Added by cargo
#
# already existing elements were commented out
# Docker
.docker
.dockerignore
Dockerfile*

#/target
fly.toml
# Rust
target/
debug/
**/*.rs.bk
*.pdb

# Development
.env
*.log
*.sh
*.md
.vscode/
tests/
examples/

# Kubernetes
k8s/
*.yaml
19 changes: 17 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,34 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=long
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install kubectl
uses: azure/setup-kubectl@v3
Expand All @@ -44,5 +59,5 @@ jobs:
- name: Update deployment image
run: |
kubectl set image deployment/friends-connect friends-connect=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
kubectl set image deployment/friends-connect friends-connect=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.meta.outputs.digest }}
kubectl rollout status deployment/friends-connect

0 comments on commit 6619465

Please sign in to comment.