Skip to content

Commit

Permalink
added ghcr pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Léonard Roch committed Mar 13, 2024
1 parent ab23e7d commit 0d9cf30
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-on-github-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish-on-github-registry

on:
push:
branches:
- publish-github-registry

jobs:
publish-on-github-registry:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

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

# - name: Extract Git Tag
# id: extract_tag
# run: echo "::set-output name=TAG::$(echo ${GITHUB_REF#refs/tags/})"

- name: Publish Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/ref-card-02:${{ github.sha }} #${{ steps.extract_tag.outputs.TAG }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Bei dieser Webanwendung teste ich dies mit `npm run build; npm run start` und ö

4. Github actions einrichten

## Pushen auf Github Registry

### 1. Pipeline erstellen

### 2. Github Actions secrets einrichten

![secrets](./docs/add-github-secrets-ghcr.png)

## Pushen und Deployen auf AWS

### 1. AWS ECR repository erstellen
Expand Down
Binary file added docs/add-github-secrets-ghcr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d9cf30

Please sign in to comment.