diff --git a/.github/workflows/release-standalone-docker-img.yml b/.github/workflows/release-standalone-docker-img.yml new file mode 100644 index 000000000..4cc8ce046 --- /dev/null +++ b/.github/workflows/release-standalone-docker-img.yml @@ -0,0 +1,47 @@ +name: Release standalone docker image +on: + push: + tags: + - "infisical-standalone/v*.*.*" + +jobs: + infisical-standalone: + name: Build infisical standalone image + runs-on: ubuntu-latest + steps: + - name: Extract version from tag + id: extract_version + run: echo "::set-output name=version::${GITHUB_REF_NAME#infisical/}" + - name: โ˜๏ธ Checkout source + uses: actions/checkout@v3 + - name: ๐Ÿ“ฆ Install dependencies to test all dependencies + run: npm ci --only-production + working-directory: backend + - name: ๐Ÿงช Run tests + run: npm run test:ci + working-directory: backend + - name: Save commit hashes for tag + id: commit + uses: pr-mpt/actions-commit-hash@v2 + - name: ๐Ÿ”ง Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: ๐Ÿ‹ Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up Depot CLI + uses: depot/setup-action@v1 + - name: ๐Ÿ“ฆ Build backend and export to Docker + uses: depot/build-push-action@v1 + with: + project: 64mmf0n610 + token: ${{ secrets.DEPOT_PROJECT_TOKEN }} + push: true + context: . + tags: | + infisical/standalone-infisical:${{ steps.commit.outputs.short }} + infisical/standalone-infisical:latest + infisical/standalone-infisical:${{ steps.extract_version.outputs.version }} + platforms: linux/amd64,linux/arm64 + file: Dockerfile.standalone-infisical diff --git a/Dockerfile.stand-alone-infisical b/Dockerfile.standalone-infisical similarity index 100% rename from Dockerfile.stand-alone-infisical rename to Dockerfile.standalone-infisical