Restore gitea action
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m25s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m25s
This commit is contained in:
59
.gitea/workflows/build-and-deploy.yaml
Normal file
59
.gitea/workflows/build-and-deploy.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.ulfrx.dev
|
||||
username: ${{ secrets.GIT_USERNAME }}
|
||||
password: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.ulfrx.dev/ulfr/recipe-mockup:latest
|
||||
git.ulfrx.dev/ulfr/recipe-mockup:${{ github.sha }}
|
||||
|
||||
- name: Update image tag in infra repo
|
||||
run: |
|
||||
REPO="ulfr/homelab"
|
||||
FILE_PATH="stacks/recipe-mockup/docker-compose.yaml"
|
||||
NEW_TAG="${{ github.sha }}"
|
||||
API_URL="https://git.ulfrx.dev/api/v1/repos/${REPO}/contents/${FILE_PATH}"
|
||||
|
||||
RESPONSE=$(curl -fsS \
|
||||
-H "Authorization: token ${{ secrets.GIT_TOKEN }}" \
|
||||
"${API_URL}")
|
||||
|
||||
FILE_SHA=$(echo "$RESPONSE" | jq -r '.sha')
|
||||
CONTENT=$(echo "$RESPONSE" | jq -r '.content' | base64 -d)
|
||||
|
||||
UPDATED=$(echo "$CONTENT" | sed "s|git.ulfrx.dev/ulfr/recipe-mockup:[a-zA-Z0-9._-]*|git.ulfrx.dev/ulfr/recipe-mockup:${NEW_TAG}|g")
|
||||
ENCODED=$(echo "$UPDATED" | base64 -w 0)
|
||||
|
||||
curl -fsS -X PUT \
|
||||
-H "Authorization: token ${{ secrets.GIT_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"message\":\"deploy: recipe-mockup ${NEW_TAG::7}\",\"content\":\"${ENCODED}\",\"sha\":\"${FILE_SHA}\"}" \
|
||||
"${API_URL}"
|
||||
|
||||
- name: Trigger Dockhand redeploy
|
||||
run: |
|
||||
curl -fsS "${{ secrets.DOCKHAND_WEBHOOK_URL }}?secret=${{ secrets.DOCKHAND_WEBHOOK_SECRET }}"
|
||||
32
.idea/workspace.xml
generated
32
.idea/workspace.xml
generated
@@ -4,12 +4,8 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="ae0e4ce8-372f-4cfd-a04f-600640f32223" name="Changes" comment="Redesign meal plan editor">
|
||||
<change beforePath="$PROJECT_DIR$/VIEWS_AND_SCENARIOS.md" beforeDir="false" afterPath="$PROJECT_DIR$/VIEWS_AND_SCENARIOS.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/js/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/app.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/mealPlanEditor.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/ui/mealPlanEditor.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/js/views/RecipeDetail.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/js/views/RecipeDetailV2.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/views/RecipeDetailV2.js" afterDir="false" />
|
||||
<list default="true" id="ae0e4ce8-372f-4cfd-a04f-600640f32223" name="Changes" comment="Redesign meal planner">
|
||||
<change afterPath="$PROJECT_DIR$/.gitea/workflows/build-and-deploy.yaml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -88,7 +84,7 @@
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1775222853874</updated>
|
||||
<workItem from="1775222854878" duration="5449000" />
|
||||
<workItem from="1775222854878" duration="6283000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Rework calendar">
|
||||
<option name="closed" value="true" />
|
||||
@@ -106,7 +102,23 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1775332140771</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<task id="LOCAL-00003" summary="Redesign recipe details">
|
||||
<option name="closed" value="true" />
|
||||
<created>1775334379181</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1775334379182</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="Redesign meal planner">
|
||||
<option name="closed" value="true" />
|
||||
<created>1775337998927</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1775337998927</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="5" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@@ -158,6 +170,8 @@
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="Rework calendar" />
|
||||
<MESSAGE value="Redesign meal plan editor" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Redesign meal plan editor" />
|
||||
<MESSAGE value="Redesign recipe details" />
|
||||
<MESSAGE value="Redesign meal planner" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Redesign meal planner" />
|
||||
</component>
|
||||
</project>
|
||||
Reference in New Issue
Block a user