add bash to test
All checks were successful
Build Container and update Flux / Explore-Gitea-Actions (push) Successful in 36s
All checks were successful
Build Container and update Flux / Explore-Gitea-Actions (push) Successful in 36s
This commit is contained in:
parent
aa6c9021b8
commit
f8194a21b4
20
.github/workflows/build.yaml
vendored
20
.github/workflows/build.yaml
vendored
|
@ -1,9 +1,13 @@
|
||||||
name: Github Actions Demo
|
name: Build Container and update Flux
|
||||||
run-name: ${{ github.actor }} is testing out GitHub Actions (on Gitea) 🚀
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
branches:
|
||||||
- k/**
|
- '*'
|
||||||
|
- '!k-*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEPLOY_MANIFEST: "${{ vars.DEPLOY_MANIFEST || 'deploy.yaml' }}"
|
||||||
|
FLUX_MANIFEST: "${{ vars.FLUX_MANIFEST || 'flux.yaml' }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
|
@ -35,17 +39,17 @@ jobs:
|
||||||
git checkout -b "$KBRANCH"
|
git checkout -b "$KBRANCH"
|
||||||
|
|
||||||
# now fix up the images in k/runner.yaml
|
# 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@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:.*@image: $DOCKER_REGISTRY/$GITHUB_REPOSITORY:$STAG@" "k/$DEPLOY_MANIFEST"
|
||||||
sed -i -e "s@branch: .*@$KBRANCH@" k/flux.yaml
|
sed -i -e "s@branch: .*@$KBRANCH@" "k/$FLUX_MANIFEST"
|
||||||
|
|
||||||
git add k
|
git add k
|
||||||
git commit -m "upgrade runner sts to $STAG"
|
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.
|
# 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.
|
# this will only happen once so it's not such an awful UX.
|
||||||
git checkout "$BRANCH"
|
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
|
if git diff | grep -q .;then
|
||||||
echo fixing branch in flux.yaml of the origin branch
|
echo fixing branch in flux.yaml of the origin branch
|
||||||
|
|
|
@ -6,6 +6,7 @@ RUN apk add \
|
||||||
nodejs \
|
nodejs \
|
||||||
tea \
|
tea \
|
||||||
curl \
|
curl \
|
||||||
|
bash \
|
||||||
--no-cache
|
--no-cache
|
||||||
|
|
||||||
USER rootless
|
USER rootless
|
||||||
|
|
Loading…
Reference in New Issue
Block a user