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
env: | |
KUBECONFIG: /tmp/github-ci.kubeconfig | |
REGISTRY: registry.cloudscale-lpg-2.appuio.cloud | |
TEST_DOMAIN: apps.cloudscale-lpg-2.appuio.cloud | |
jobs: | |
build: | |
environment: dev | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
with: | |
KUBECONFIG_DATA: "${{ secrets.KUBECONFIG_DEV }}" | |
- uses: ./.github/actions/build | |
with: | |
REGISTRY: "${{ env.REGISTRY }}" | |
- env: | |
NEWLINE: |2+ | |
name: Generate Deployment | |
run: | | |
jq -r 'try to_entries | map("\(.key)=\(.value|tostring|tojson)") | .[]' > .composeenv <<'EOF' ${{ env.NEWLINE }}${{ toJson(vars) }}${{ env.NEWLINE }}EOF | |
jq -r 'try to_entries | map("\(.key)=\(.value|tostring|tojson)") | .[]' >> .composeenv <<'EOF' ${{ env.NEWLINE }}${{ toJson(secrets) }}${{ env.NEWLINE }}EOF | |
docker run -v "${PWD}:/data" -w /data --env-file <(env) ghcr.io/vshn/k8ify-appcat:latest /bin/k8ify dev ${CI_COMMIT_REF_SLUG} --shell-env-file .composeenv --modified-image '${{ env.NAMESPACE }}/${{ env.CI_PROJECT_NAME }}:${{ env.CI_COMMIT_REF_SLUG }}' | |
rm .composeenv | |
kubectl diff -f manifests/ || true | |
- name: Deploy | |
run: kubectl apply -f manifests/ || true | |
name: Build and deploy to dev | |
"on": | |
push: | |
branches: | |
- '**' | |
branches_ignore: | |
- master | |
workflow_dispatch: {} |