From b83a8e02e74a3eb00a70ffcd84102f2fb632f4fe Mon Sep 17 00:00:00 2001 From: James Andariese Date: Thu, 28 Mar 2024 22:46:40 -0500 Subject: [PATCH] add bash to test --- .github/workflows/build.yaml | 20 ++++++++++++-------- Dockerfile | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d93393e..ea8060f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,9 +1,13 @@ -name: Github Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions (on Gitea) 🚀 +name: Build Container and update Flux on: push: - paths-ignore: - - k/** + branches: + - '*' + - '!k-*' + +env: + DEPLOY_MANIFEST: "${{ vars.DEPLOY_MANIFEST || 'deploy.yaml' }}" + FLUX_MANIFEST: "${{ vars.FLUX_MANIFEST || 'flux.yaml' }}" jobs: Explore-Gitea-Actions: @@ -35,17 +39,17 @@ jobs: git checkout -b "$KBRANCH" # now fix up the images in k/runner.yaml - sed -i -e "s@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:.*@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:$STAG@" k/runner.yaml - sed -i -e "s@branch: .*@$KBRANCH@" k/flux.yaml + sed -i -e "s@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:.*@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:$STAG@" "$DEPLOY_MANIFEST" + sed -i -e "s@branch: .*@$KBRANCH@" "k/$FLUX_MANIFEST" git add k git commit -m "upgrade runner sts to $STAG" - git push -f origin k-$GITHUB_REF_NAME + git push -f origin "$KBRANCH" # now let's fix the origin branch's flux.yaml if it's needed. # this will only happen once so it's not such an awful UX. git checkout "$BRANCH" - sed -i -e "s@branch: .*@$KBRANCH@" k/flux.yaml + sed -i -e "s@branch: .*@$KBRANCH@" "k/$FLUX_MANIFEST" if git diff | grep -q .;then echo fixing branch in flux.yaml of the origin branch diff --git a/Dockerfile b/Dockerfile index 2c19864..6133b30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN apk add \ nodejs \ tea \ curl \ + bash \ --no-cache USER rootless