fix: convert all workflows to standard htpasswd pattern (no artifacts)
- Removed artifact upload/download steps from all workflows - Merged build+test into single 'test' job, eliminating artifact dependency - Removed ChristopherHX/gitea-upload-artifact and download-artifact actions - Builds image directly with docker build and runs tests in same job - Push job rebuilds independently with docker/build-push-action - pr.yaml: lint → test only (no push/version bump) - tag.yaml: lint → test → push with semver tags - cron.yaml: keeps original '0 0 * * *' schedule - All pinned SHAs preserved
This commit is contained in:
@@ -10,37 +10,17 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
- name: Hadolint
|
||||
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d576162eba76ba5e5 # v3.3.0
|
||||
|
||||
build:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5cec5c76c4d5afdd7de93df5 # v4
|
||||
- name: Build image
|
||||
run: docker build -t ci-image:${{ github.sha }} .
|
||||
- name: Save image
|
||||
run: docker save ci-image:${{ github.sha }} > image.tar
|
||||
- name: Upload artifact
|
||||
uses: ChristopherHX/gitea-upload-artifact@62ac910c5d3dfa85c7cb2df15afe2e342b2407c2 # main
|
||||
with:
|
||||
name: docker-image
|
||||
path: image.tar
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
- name: Download artifact
|
||||
uses: ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # main
|
||||
with:
|
||||
name: docker-image
|
||||
- name: Load image
|
||||
run: docker load < image.tar
|
||||
- name: Run tests
|
||||
run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||
run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||
Reference in New Issue
Block a user