Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/.github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Continous Delivery

on:
push:
tags:
- 'v*'

env:
REGISTRY: ghcr.io
SERVICE: credo-controller

jobs:
build-and-push:
name: Push Docker image to GitHub
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

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

- name: Extract Git Tag
id: get_tag
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

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

- name: Build and Push Docker Image ${{ env.SERVICE }}
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:${{ env.TAG }}
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:latest
Loading