Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -58,22 +58,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and export
|
||||
uses: docker/build-push-action@v5 # Build Docker image via Dockerfile
|
||||
with:
|
||||
context: backend # Directory of Dockerfile
|
||||
tags: ${{ inputs.image-name }}:${{ inputs.image-tag }}
|
||||
outputs: type=docker,dest=/tmp/image.tar
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: image
|
||||
path: /tmp/image.tar
|
||||
retention-days: 2
|
||||
|
||||
integration-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -123,6 +121,7 @@ jobs:
|
||||
with:
|
||||
name: trivy-results
|
||||
path: /tmp/trivy-results.json
|
||||
retention-days: 2
|
||||
|
||||
publish-image:
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -143,4 +142,5 @@ jobs:
|
||||
docker login gitea.cuihang1201.synology.me -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
- name: Push Docker image
|
||||
run: |
|
||||
docker push ${{ vars.IMAGE }}:${{ inputs.image-tag }}
|
||||
docker push ${{ inputs.image-name }}:${{ inputs.image-tag }}
|
||||
docker rmi ${{ inputs.image-name }}:${{ inputs.image-tag }}
|
||||
Reference in New Issue
Block a user