Skip to content

Commit

Permalink
Push rust rocket image to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-eberle committed Feb 15, 2024
1 parent 49f000a commit 90d9ad3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/k8s-rust-rocket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build & Deploy Rust Rocket to k8s

on:
push:
branches:
- '**'
paths:
- bookstore-rocketrs/**

jobs:
publish:
name: Build & Deploy RustRocket
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build, tag, and push image to Amazon ECR
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/bookstore-rocketrs:$GITHUB_SHA .
docker push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/bookstore-rocketrs:$GITHUB_SHA
working-directory: ./bookstore-rocketrs

0 comments on commit 90d9ad3

Please sign in to comment.