1
0

Compare commits

...

34 Commits

Author SHA1 Message Date
felegy
c3fb26a8a2 ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 1m3s
2025-08-22 15:31:05 +00:00
felegy
a247bed8d4 ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 47s
2025-08-22 14:42:18 +00:00
felegy
cac5e8ff15 ~ Rebuild Image 2025-08-22 14:42:08 +00:00
felegy
9a49e2c994 ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 54s
2025-08-22 14:32:35 +00:00
felegy
9f0fcb1b7e ~ Rebuild Image 2025-08-22 14:31:05 +00:00
felegy
3fa4045772 ~ Rebuild Image 2025-08-22 13:52:37 +00:00
felegy
82e109b10b ~ Rebuild Image 2025-08-22 13:40:29 +00:00
felegy
b0ce0a956b ~ Rebuild Image 2025-08-22 13:35:28 +00:00
felegy
1ccb70138e ~ Rebuild Image 2025-08-22 13:32:29 +00:00
felegy
f9d823535e ~ Rebuild Image 2025-08-22 12:59:56 +00:00
felegy
f57b277951 ~ Rebuild Image 2025-08-22 12:54:00 +00:00
felegy
ae9a2e17c1 + ADD ssh deploy key 2025-08-22 12:50:17 +00:00
felegy
d6a1e650dc ~ FIX image build and deploy pipeline
All checks were successful
/ build-and-deploy (push) Successful in 2m39s
2025-08-21 15:00:22 +00:00
felegy
e96743093f ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 51s
2025-08-21 14:39:55 +00:00
felegy
e4236cff6b + ADD dev branch to build 2025-08-21 14:36:40 +00:00
felegy
afe07ae420 + ADD SHORT_SHA to GITHUB_ENV in cd.yaml
All checks were successful
/ build-and-deploy (push) Successful in 1m0s
2025-08-21 13:52:51 +00:00
felegy
123c750a59 ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 53s
2025-08-21 12:43:14 +00:00
felegy
056c391fe7 ~ FIX IMAGE_NAME in cd.yaml
All checks were successful
/ build-and-deploy (push) Successful in 1m31s
2025-08-21 12:34:04 +00:00
felegy
eebe74744b + ADD github build and deploy action
Some checks failed
/ build-and-deploy (push) Failing after 15s
2025-08-21 12:27:12 +00:00
felegy
eaf474d9eb + ADD github build and deploy action
Some checks failed
/ build-and-deploy (push) Failing after 14s
2025-08-21 12:25:00 +00:00
felegy
1d136f7000 + ADD github build and deploy action
Some checks failed
/ build-and-deploy (push) Failing after 1m37s
2025-08-21 12:09:59 +00:00
felegy
26fee97c1c ~ Rebuild Image
All checks were successful
/ build-and-deploy (push) Successful in 54s
2025-08-21 09:25:14 +00:00
felegy
ba142c4a56 + ADD kubernete config connect
All checks were successful
/ build-and-deploy (push) Successful in 54s
2025-08-21 08:14:02 +00:00
felegy
7f46b0cd62 + ADD kubernete config connect
All checks were successful
/ build-and-deploy (push) Successful in 1m3s
2025-08-21 06:49:35 +00:00
felegy
06ab24d428 + ADD kubernete secrets
Some checks failed
/ build-and-deploy (push) Failing after 12s
2025-08-19 12:46:27 +00:00
felegy
3827fa7394 + ADD kubernete secrets
Some checks failed
/ build-and-deploy (push) Failing after 12s
2025-08-19 12:43:10 +00:00
felegy
6d99c082d3 + ADD kubernete secrets
Some checks failed
/ build-and-deploy (push) Failing after 12s
2025-08-19 12:42:05 +00:00
felegy
63e124a3a3 + ADD kubernete secrets
Some checks failed
/ build-and-deploy (push) Failing after 12s
2025-08-19 12:38:30 +00:00
felegy
f942374041 + ADD kubernete secrets
Some checks failed
/ build-and-deploy (push) Failing after 14s
2025-08-19 12:08:05 +00:00
felegy
7629fca727 ~ Rebuild Image
Some checks failed
/ build-and-deploy (push) Failing after 14s
2025-08-19 11:50:30 +00:00
Gabor FELEGYHAZI
31f2c913d7 Update cd.yaml
Some checks failed
/ build-and-deploy (push) Failing after 14s
2025-08-19 13:48:15 +02:00
felegy
4378172d31 + ADD kubernetes role and rolebinding
Some checks failed
/ build-and-deploy (push) Failing after 16s
2025-08-19 11:31:15 +00:00
felegy
b400a63696 ~ Rebuild Image
Some checks failed
/ build-and-deploy (push) Failing after 1m29s
2025-08-19 09:36:22 +00:00
felegy
ed0ce9f5cd ~ Rebuild Image 2025-08-19 09:32:20 +00:00
3 changed files with 62 additions and 25 deletions

View File

@@ -1,28 +1,32 @@
on:
push:
branches: [ main ]
branches:
- main
- dev
env:
NAMESPACE: ${{ github.repository_owner }}
DOCKER_REGISTRY: ghcr.io
DOCKER_REPOSITORY: ${{ github.repository }}
jobs:
build-and-deploy:
env:
IMAGE: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: benjlevesque/short-sha@v3.0
id: short-sha
with:
length: 10
- name: Set up kpack-cli
- name: Install kpack-cli
env:
KPACK_CLI_VERSION: "0.13.0"
KPACK_CLI_VERSION: 0.13.0
KPACK_CLI_SHA256: 52f0c927a1350f4f1bb281575ec246f406fb96aa69dc974ed10a2fe52c538158
working-directory: /tmp
run: |
mkdir kp-binaries
curl -L "https://github.com/buildpacks-community/kpack-cli/releases/download/v${KPACK_CLI_VERSION}/kp-linux-amd64-${KPACK_CLI_VERSION}" -o kp-binaries/kp-linux-amd64-${KPACK_CLI_VERSION}
curl -LO "https://github.com/buildpacks-community/kpack-cli/releases/download/v${KPACK_CLI_VERSION}/kp-linux-amd64-${KPACK_CLI_VERSION}.sha256"
sha256sum -c kp-linux-amd64-${KPACK_CLI_VERSION}.sha256 || exit 1
sudo mv kp-binaries/kp-linux-amd64-${KPACK_CLI_VERSION} /usr/local/bin/kp
set -ex
curl -sLO "https://github.com/buildpacks-community/kpack-cli/releases/download/v${KPACK_CLI_VERSION}/kp-linux-amd64-${KPACK_CLI_VERSION}"
echo "${KPACK_CLI_SHA256} kp-linux-amd64-${KPACK_CLI_VERSION}" | sha256sum --check || exit 1
sudo mv kp-linux-amd64-${KPACK_CLI_VERSION} /usr/local/bin/kp
sudo chmod +x /usr/local/bin/kp
kp version
- name: Set up kubectl
- name: Install kubectl
uses: azure/setup-kubectl@v4
- name: Configure kubectl
uses: azure/k8s-set-context@v1
@@ -31,16 +35,20 @@ jobs:
- name: Update kpack image
env:
SHA: ${{ github.sha }}
SHORT_SHA: ${{ steps.short-sha.outputs.sha }}
run: |
kp image patch tutorial-image --replace-additional-tag "ghcr.io/hvg-dev/php-test:sha-${SHORT_SHA}" --git-revision "${SHA}" -n test-builder
SHORT_SHA=$(git rev-parse --short HEAD)
echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV
IMAGE_NAME="${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}-${GITHUB_REF##*/}"
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV
kp image patch $IMAGE_NAME --replace-additional-tag "${IMAGE}:sha-${SHORT_SHA}" --git-revision "${SHA}" -n $NAMESPACE
kp image status $IMAGE_NAME -n $NAMESPACE
- name: Wait for build to complete
run: |
BUILD=$(kubectl -n test-builder get image tutorial-image -o jsonpath='{.status.buildCounter}')
BUILD_REF=$(kubectl -n test-builder get image tutorial-image -o jsonpath='{.status.latestBuildRef}')
kp build logs tutorial-image -n test-builder --build ${BUILD}
kp build status tutorial-image -n test-builder -b $BUILD
if [ "$(kubectl -n test-builder get build $BUILD_REF -o jsonpath='{.status.conditions[0].status}')" != "True" ]; then exit 1; fi
BUILD=$(kubectl -n $NAMESPACE get image $IMAGE_NAME -o jsonpath='{.status.buildCounter}')
BUILD_REF=$(kubectl -n $NAMESPACE get image $IMAGE_NAME -o jsonpath='{.status.latestBuildRef}')
kp build logs $IMAGE_NAME -n $NAMESPACE --build ${BUILD}
kp build status $IMAGE_NAME -n $NAMESPACE -b $BUILD
if [ "$(kubectl -n $NAMESPACE get build $BUILD_REF -o jsonpath='{.status.conditions[0].status}')" != "True" ]; then exit 1; fi
# - name: Update Kubernetes deployment
# run: |
# kubectl set image deployment/my-app my-app=<registry>/<repository>:${{ github.sha }}

View File

@@ -1,15 +1,22 @@
on:
push:
branches: [ main ]
branches:
- main
- dev
jobs:
build-image-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: yesolutions/mirror-action@master
- uses: felegy/mirror-action@master
with:
REMOTE: https://git.saito.systems/felegy/test-php.git
GIT_USERNAME: felegy
GIT_PASSWORD: ${{ secrets.DEPLOY_REPO_TOKEN }}
REMOTE: git@${{ secrets.DEPLOY_REPO }}:${{ github.repository }}.git
SSH_CONFIG: |
Host ${{ secrets.DEPLOY_REPO }}
ProxyCommand cloudflared access ssh --hostname %h
GIT_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
GIT_SSH_NO_VERIFY_HOST: "true"

View File

@@ -1,3 +1,25 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: runner-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: runner-role-binding
subjects:
- kind: ServiceAccount
name: default
roleRef:
kind: Role
name: runner-role
apiGroup: rbac.authorization.k8s.io
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata: