mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
feat: auto trigger binary release
This commit is contained in:
@@ -5,6 +5,8 @@ on:
|
|||||||
- "v*.*.*"
|
- "v*.*.*"
|
||||||
- "v*.*.*-nightly-*"
|
- "v*.*.*-nightly-*"
|
||||||
- "v*.*.*-nightly-*.*"
|
- "v*.*.*-nightly-*.*"
|
||||||
|
branches:
|
||||||
|
- "daniel/auto-trigger-binary-release"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
infisical-tests:
|
infisical-tests:
|
||||||
@@ -20,51 +22,51 @@ jobs:
|
|||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: echo "::set-output name=version::${GITHUB_REF_NAME}"
|
run: echo "::set-output name=version::${GITHUB_REF_NAME}"
|
||||||
- name: ☁️ Checkout source
|
# - name: ☁️ Checkout source
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 0
|
# fetch-depth: 0
|
||||||
- name: 📦 Install dependencies to test all dependencies
|
# - name: 📦 Install dependencies to test all dependencies
|
||||||
run: npm ci --only-production
|
# run: npm ci --only-production
|
||||||
working-directory: backend
|
# working-directory: backend
|
||||||
- name: version output
|
# - name: version output
|
||||||
run: |
|
# run: |
|
||||||
echo "Output Value: ${{ steps.version.outputs.major }}"
|
# echo "Output Value: ${{ steps.version.outputs.major }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.minor }}"
|
# echo "Output Value: ${{ steps.version.outputs.minor }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.patch }}"
|
# echo "Output Value: ${{ steps.version.outputs.patch }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.version }}"
|
# echo "Output Value: ${{ steps.version.outputs.version }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.version_type }}"
|
# echo "Output Value: ${{ steps.version.outputs.version_type }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.increment }}"
|
# echo "Output Value: ${{ steps.version.outputs.increment }}"
|
||||||
- name: Save commit hashes for tag
|
# - name: Save commit hashes for tag
|
||||||
id: commit
|
# id: commit
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
# uses: pr-mpt/actions-commit-hash@v2
|
||||||
- name: 🔧 Set up Docker Buildx
|
# - name: 🔧 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
# uses: docker/setup-buildx-action@v2
|
||||||
- name: 🐋 Login to Docker Hub
|
# - name: 🐋 Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
# uses: docker/login-action@v2
|
||||||
with:
|
# with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Set up Depot CLI
|
# - name: Set up Depot CLI
|
||||||
uses: depot/setup-action@v1
|
# uses: depot/setup-action@v1
|
||||||
- name: 📦 Build backend and export to Docker
|
# - name: 📦 Build backend and export to Docker
|
||||||
uses: depot/build-push-action@v1
|
# uses: depot/build-push-action@v1
|
||||||
with:
|
# with:
|
||||||
project: 64mmf0n610
|
# project: 64mmf0n610
|
||||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
# token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||||
push: true
|
# push: true
|
||||||
context: .
|
# context: .
|
||||||
tags: |
|
# tags: |
|
||||||
infisical/infisical:latest
|
# infisical/infisical:latest
|
||||||
infisical/infisical:${{ steps.commit.outputs.short }}
|
# infisical/infisical:${{ steps.commit.outputs.short }}
|
||||||
infisical/infisical:${{ steps.extract_version.outputs.version }}
|
# infisical/infisical:${{ steps.extract_version.outputs.version }}
|
||||||
platforms: linux/amd64,linux/arm64
|
# platforms: linux/amd64,linux/arm64
|
||||||
file: Dockerfile.standalone-infisical
|
# file: Dockerfile.standalone-infisical
|
||||||
build-args: |
|
# build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
# POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
# INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
||||||
DD_GIT_REPOSITORY_URL=${{ github.server_url }}/${{ github.repository }}
|
# DD_GIT_REPOSITORY_URL=${{ github.server_url }}/${{ github.repository }}
|
||||||
DD_GIT_COMMIT_SHA=${{ github.sha }}
|
# DD_GIT_COMMIT_SHA=${{ github.sha }}
|
||||||
|
|
||||||
infisical-fips-standalone:
|
infisical-fips-standalone:
|
||||||
name: Build infisical standalone image postgres
|
name: Build infisical standalone image postgres
|
||||||
@@ -74,46 +76,62 @@ jobs:
|
|||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: echo "::set-output name=version::${GITHUB_REF_NAME}"
|
run: echo "::set-output name=version::${GITHUB_REF_NAME}"
|
||||||
- name: ☁️ Checkout source
|
# - name: ☁️ Checkout source
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 0
|
# fetch-depth: 0
|
||||||
- name: 📦 Install dependencies to test all dependencies
|
# - name: 📦 Install dependencies to test all dependencies
|
||||||
run: npm ci --only-production
|
# run: npm ci --only-production
|
||||||
working-directory: backend
|
# working-directory: backend
|
||||||
- name: version output
|
# - name: version output
|
||||||
run: |
|
# run: |
|
||||||
echo "Output Value: ${{ steps.version.outputs.major }}"
|
# echo "Output Value: ${{ steps.version.outputs.major }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.minor }}"
|
# echo "Output Value: ${{ steps.version.outputs.minor }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.patch }}"
|
# echo "Output Value: ${{ steps.version.outputs.patch }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.version }}"
|
# echo "Output Value: ${{ steps.version.outputs.version }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.version_type }}"
|
# echo "Output Value: ${{ steps.version.outputs.version_type }}"
|
||||||
echo "Output Value: ${{ steps.version.outputs.increment }}"
|
# echo "Output Value: ${{ steps.version.outputs.increment }}"
|
||||||
- name: Save commit hashes for tag
|
# - name: Save commit hashes for tag
|
||||||
id: commit
|
# id: commit
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
# uses: pr-mpt/actions-commit-hash@v2
|
||||||
- name: 🔧 Set up Docker Buildx
|
# - name: 🔧 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
# uses: docker/setup-buildx-action@v2
|
||||||
- name: 🐋 Login to Docker Hub
|
# - name: 🐋 Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
# uses: docker/login-action@v2
|
||||||
with:
|
# with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Set up Depot CLI
|
# - name: Set up Depot CLI
|
||||||
uses: depot/setup-action@v1
|
# uses: depot/setup-action@v1
|
||||||
- name: 📦 Build backend and export to Docker
|
# - name: 📦 Build backend and export to Docker
|
||||||
uses: depot/build-push-action@v1
|
# uses: depot/build-push-action@v1
|
||||||
with:
|
# with:
|
||||||
project: 64mmf0n610
|
# project: 64mmf0n610
|
||||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
# token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||||
push: true
|
# push: true
|
||||||
context: .
|
# context: .
|
||||||
tags: |
|
# tags: |
|
||||||
infisical/infisical-fips:latest
|
# infisical/infisical-fips:latest
|
||||||
infisical/infisical-fips:${{ steps.commit.outputs.short }}
|
# infisical/infisical-fips:${{ steps.commit.outputs.short }}
|
||||||
infisical/infisical-fips:${{ steps.extract_version.outputs.version }}
|
# infisical/infisical-fips:${{ steps.extract_version.outputs.version }}
|
||||||
platforms: linux/amd64,linux/arm64
|
# platforms: linux/amd64,linux/arm64
|
||||||
file: Dockerfile.fips.standalone-infisical
|
# file: Dockerfile.fips.standalone-infisical
|
||||||
build-args: |
|
# build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
# POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
# INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
||||||
|
trigger-binary-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [infisical-standalone, infisical-fips-standalone]
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Create tag if it doesn't exist
|
||||||
|
run: |
|
||||||
|
if ! gh api repos/Infisical/infisical-omnibus/git/refs/tags/${{ github.ref_name }} 2>/dev/null; then
|
||||||
|
LATEST_SHA=$(gh api repos/Infisical/infisical-omnibus/git/refs/heads/main --jq '.object.sha')
|
||||||
|
gh api repos/Infisical/infisical-omnibus/git/refs \
|
||||||
|
--method POST \
|
||||||
|
--field ref="refs/tags/v0.150.0-nightly-20250926" \
|
||||||
|
--field sha="$LATEST_SHA"
|
||||||
|
fi
|
||||||
|
# --field ref="refs/tags/${{ github.ref_name }}" \
|
||||||
Reference in New Issue
Block a user