diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..64c4d19 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,56 @@ +name: Build + +# on: +# push: +# paths: +# - manifest.yaml + + +on: + push: + paths-ignore: + - 'manifests/**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - id: commit + uses: prompt/actions-commit-hash@v3 + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Build + run: | + npm install + npm run build + - name: 'Login to Container Registry' + uses: docker/login-action@v3 + with: + registry: leafdev.top + username: ${{ gitea.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: 'Build Inventory Image' + run: | + docker build . -f Dockerfile --tag leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }} + docker push leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }} + docker tag leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }} leafdev.top/leaf/amber-ui:latest + - name: 'Patch Manifest' + uses: fjogeleit/yaml-update-action@main + with: + valueFile: 'manifests/deployment.yaml' + propertyPath: 'spec.template.spec.containers[0].image' + value: 'leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }}' + commitChange: false + - name: Push + run: | + git config user.name ${{ gitea.actor }} + git config user.email ${{ gitea.actor }}@users.noreply.leafdev.top + git add manifests/deployment.yaml + git commit -m "Update manifests" + # git push https://${{ secrets.GITEA_TOKEN }}@leafdev.top/${{ gitea.repository }}.git + git push \ No newline at end of file diff --git a/index.html b/index.html index 82380d8..d7be100 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - amber-wails + Amberlet 琥珀