Skip to content

Commit

Permalink
Add CD Flow (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nordschesasa authored Apr 7, 2024
1 parent 457e76a commit 14a24c5
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ on:
- 'main'
paths-ignore:
- '**.md'
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
name: Build and release docker images

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
Expand All @@ -20,6 +26,13 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.event.repository.full_name }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -29,5 +42,32 @@ jobs:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
ghcr.io/${{ github.event.repository.full_name }}
ghcr.io/${{ github.event.repository.full_name }}
binary:
runs-on: ubuntu-latest
name: Build and release binary

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- uses: actions/setup-go@v3
with:
go-version: '1.22'

- name: Build
run: |
make build
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
title: "Itachi"
files: |
./itachi

0 comments on commit 14a24c5

Please sign in to comment.