9400815a01
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 26s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m10s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m39s
CI Feature / Report Summary (push) Successful in 6s
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Check Existing Artifact
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
env_json:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
GITEA_TOKEN:
|
|
required: true
|
|
outputs:
|
|
artifact_exists:
|
|
value: ${{ jobs.check.outputs.artifact_exists }}
|
|
version:
|
|
value: ${{ jobs.check.outputs.version }}
|
|
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GIT_TAG_PREFIX: ${{ fromJson(inputs.env_json).GIT_TAG_PREFIX || '' }}
|
|
VERSION_FILE: ${{ fromJson(inputs.env_json).VERSION_FILE || '' }}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
artifact_exists: ${{ steps.set-outputs.outputs.artifact_exists }}
|
|
version: ${{ steps.set-outputs.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: niko/gitea-ci-library
|
|
path: .ci
|
|
|
|
- name: Check existing artifact and calculate version
|
|
env:
|
|
SERVER_URL: ${{ gitea.server_url }}
|
|
REPO: ${{ github.repository }}
|
|
SHA: ${{ github.sha }}
|
|
run: bash .ci/scripts/check-version.sh
|
|
|
|
- name: Set job outputs
|
|
id: set-outputs
|
|
run: |
|
|
source /tmp/build-ctx/build.env
|
|
echo "artifact_exists=$ARTIFACT_EXISTS" >> "$GITHUB_OUTPUT"
|
|
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
|