-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.27 KB
/
cd-kubfeature.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and push app Docker image to GitHub
on:
push:
branches:
- feature/api
jobs:
mirror_to_portfolio:
runs-on: ubuntu-latest
steps:
- name: 'Mirror to portfolio repo'
uses: 'neeptossss/[email protected]'
with:
repo: 'neeptossss/portfolio'
ssh-key: ${{ secrets.SSH_KEY }}
build_and_push:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
context: "./app"
tags: |
ghcr.io/tux-inc/qraft-app:latest-feature-kubernetes
ghcr.io/tux-inc/qraft-app:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max