test: Add secret priority test and fix Forgejo workflow variables
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Successful in 8m22s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 6s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 2m40s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Successful in 8m22s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 6s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 2m40s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
- Add test step to check TEST_SECRET priority (user: apple, org: pear, repo: pumpkin) - Fix build number variable from GITHUB_RUN_NUMBER to ACTIONS_RUN_NUMBER - Fix commit hash to use full hash instead of truncated version - Add clear comments explaining Forgejo-specific variables - This will help resolve the package versioning mismatch issue
This commit is contained in:
parent
415d8c252d
commit
cff579876b
1 changed files with 14 additions and 4 deletions
|
|
@ -21,6 +21,14 @@ jobs:
|
||||||
image: rust:trixie
|
image: rust:trixie
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Test secret priority
|
||||||
|
run: |
|
||||||
|
echo "Testing secret priority:"
|
||||||
|
echo "TEST_SECRET value: ${{ secrets.TEST_SECRET }}"
|
||||||
|
echo "User level: apple"
|
||||||
|
echo "Org level: pear"
|
||||||
|
echo "Repo level: pumpkin"
|
||||||
|
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
run: |
|
run: |
|
||||||
# Try apt-cacher-ng first, fallback to Debian's automatic mirror selection
|
# Try apt-cacher-ng first, fallback to Debian's automatic mirror selection
|
||||||
|
|
@ -107,8 +115,9 @@ jobs:
|
||||||
echo "Building Debian package..."
|
echo "Building Debian package..."
|
||||||
|
|
||||||
# Get build information for versioning
|
# Get build information for versioning
|
||||||
BUILD_NUMBER="${GITHUB_RUN_NUMBER:-$(date +%s)}"
|
# Forgejo/Gitea Actions uses ACTIONS_RUN_NUMBER, fallback to timestamp
|
||||||
COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
BUILD_NUMBER="${ACTIONS_RUN_NUMBER:-$(date +%s)}"
|
||||||
|
COMMIT_HASH=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
|
||||||
BUILD_VERSION="0.1.0+build${BUILD_NUMBER}.${COMMIT_HASH}"
|
BUILD_VERSION="0.1.0+build${BUILD_NUMBER}.${COMMIT_HASH}"
|
||||||
|
|
||||||
echo "Build Version: $BUILD_VERSION"
|
echo "Build Version: $BUILD_VERSION"
|
||||||
|
|
@ -455,8 +464,9 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get build info for registry
|
# Get build info for registry
|
||||||
BUILD_NUMBER="${GITHUB_RUN_NUMBER:-$(date +%s)}"
|
# Forgejo/Gitea Actions uses ACTIONS_RUN_NUMBER, fallback to timestamp
|
||||||
COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
BUILD_NUMBER="${ACTIONS_RUN_NUMBER:-$(date +%s)}"
|
||||||
|
COMMIT_HASH=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
|
||||||
|
|
||||||
echo "Publishing packages for build $BUILD_NUMBER (commit $COMMIT_HASH)"
|
echo "Publishing packages for build $BUILD_NUMBER (commit $COMMIT_HASH)"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue