This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0bcb216
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Packages | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/meisterplan/actions-k8s-deploy/actions-k8s-deploy:${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM amazon/aws-cli:2.13.26 | ||
|
||
# Install common cli tools | ||
RUN yum install -y curl make grep git tar zsh && yum clean all && rm -rf /var/cache/yum | ||
|
||
# Install latest jq & yq version | ||
RUN curl -Lo /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq | ||
RUN curl -Lo /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 && chmod +x /usr/bin/yq | ||
|
||
|
||
# Install aws-iam-authenticator for k8s | ||
ENV AWS_IAM_AUTH_VERSION=0.6.11 | ||
RUN curl -Lo /usr/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_AUTH_VERSION}/aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64 && \ | ||
chmod +x /usr/bin/aws-iam-authenticator | ||
|
||
# Install kubectl | ||
ENV KUBECTL_VERSION=1.28.3 | ||
RUN curl -Lo /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \ | ||
chmod +x /usr/bin/kubectl | ||
|
||
# Install helm | ||
ENV HELM_VERSION=3.13.1 | ||
RUN cd /tmp && \ | ||
curl -Lo helm.tgz https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ | ||
tar xvfz helm.tgz && \ | ||
mv linux-amd64/helm /usr/bin/helm && \ | ||
rm -rf /tmp/* | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: 'Kubernetes Deploy' | ||
description: 'Deploy things to Kubernetes using a custom command' | ||
inputs: | ||
command: | ||
description: 'Command that should be executed' | ||
required: true | ||
working-directory: | ||
description: 'Directory where the command should be executed' | ||
default: "." | ||
runs: | ||
using: 'docker' | ||
image: 'docker://ghcr.io/meisterplan/actions-k8s-deploy/actions-k8s-deploy@master' | ||
args: | ||
- "cd ${{ inputs.working-directory }} && ${{ inputs.command }} && echo \"Hello World\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
/bin/bash -c "$@" |