fixed gitea CI misplaced file
All checks were successful
build-os / build-image (push) Successful in 8s
All checks were successful
build-os / build-image (push) Successful in 8s
This commit is contained in:
49
.gitea/workflows/build.yml
Normal file
49
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
name: build-os
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- testing
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE: gitea.nekonetwork.io/cybrneko/neko-system
|
||||
REGISTRY: gitea.nekonetwork.io
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: podman-host
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set tag based on branch
|
||||
id: tag
|
||||
run: |
|
||||
if [ "${GITHUB_REF_NAME}" = "main" ]; then
|
||||
echo "tag=latest" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "tag=testing" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Verify tools
|
||||
run: |
|
||||
podman --version
|
||||
sudo -n podman --version
|
||||
|
||||
- name: Log in to registry
|
||||
env:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASS: ${{ secrets.REGISTRY_PASS }}
|
||||
run: |
|
||||
echo "$REGISTRY_PASS" | sudo -n podman login "$REGISTRY" \
|
||||
-u "$REGISTRY_USER" --password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
sudo -n podman build -f Containerfile -t "$IMAGE:${{ steps.tag.outputs.tag }}" .
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
sudo -n podman push "$IMAGE:${{ steps.tag.outputs.tag }}"
|
||||
Reference in New Issue
Block a user