Skip to content

Commit

Permalink
feat: remove skaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
irony committed Feb 5, 2024
1 parent d18f869 commit 3d42e2d
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 176 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Continuous Integration

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

on:
push:
branches:
- master
- main
tags:
- production*
- staging*
paths-ignore:
- 'k8s/**'

jobs:
version:
runs-on: ubuntu-latest

steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- name: 🎫 Update patch version
run: |
git fetch
git checkout main
git pull origin main
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
if [[ $GITHUB_REF == refs/tags/production* ]]; then
npm version major
elif [[ $GITHUB_REF == refs/tags/staging* ]]; then
npm version minor
else
npm version patch
fi
git fetch --all
git push origin main
ci:
runs-on: ubuntu-latest
needs: version

steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- id: imagename
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository }}

- run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
if [[ $GITHUB_REF == refs/tags/production* ]]; then
npm version major
elif [[ $GITHUB_REF == refs/tags/staging* ]]; then
npm version minor
else
npm version patch
fi
- name: 📝 Get Current Version
id: package-version
uses: martinbeentjes/npm-get-version-action@main

- name: 🔐 Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🔧 Build and push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ env.REGISTRY }}/${{ steps.imagename.outputs.lowercase }}:${{ steps.package-version.outputs.current-version}}
33 changes: 33 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Production

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

on:
release:
types: [published]

jobs:
production:
runs-on: ubuntu-latest

steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- name: 🔐 Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🔧 Build and push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:release-${{ github.event.release.tag_name }}
57 changes: 0 additions & 57 deletions .github/workflows/publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
containers:
- name: mandatkollen
image: iteam1337/mandatkollen
image: ghcr.io/iteam1337/mandatkollen:1.1.6 # {"$imagepolicy": "flux-system:data-pipeline"}
ports:
- containerPort: 80
readinessProbe:
Expand Down
4 changes: 0 additions & 4 deletions kustomize/kustomization.yaml

This file was deleted.

88 changes: 0 additions & 88 deletions kustomize/latest.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions skaffold.yaml

This file was deleted.

0 comments on commit 3d42e2d

Please sign in to comment.