forked from github/safe-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
777a97f
commit c62ad67
Showing
5 changed files
with
9 additions
and
340 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
name: Create a release | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - main-enterprise | ||
inputs: | ||
version: | ||
description: 'Version to release' | ||
required: true | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.actor != 'dependabot'}} | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release: ${{ steps.finalrelease.outputs.release }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup node | ||
|
@@ -42,17 +45,6 @@ jobs: | |
- name: Inspect the Docker Image | ||
run: | | ||
docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise | ||
- name: Run Functional Tests | ||
id: functionaltest | ||
run: | | ||
docker run --env APP_ID=${{ secrets.APP_ID }} --env PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} --env WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }} -d -p 3000:3000 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise | ||
sleep 10 | ||
curl http://localhost:3000 | ||
- name: Tag a final release | ||
id: finalrelease | ||
uses: actionsdesk/[email protected] | ||
with: | ||
bump: final | ||
- name: Push Docker Image | ||
if: ${{ success() }} | ||
uses: docker/build-push-action@master | ||
|
@@ -61,41 +53,7 @@ jobs: | |
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.finalrelease.outputs.release }} | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.version }} | ||
platforms: linux/amd64,linux/arm64 | ||
provenance: false | ||
sbom: false | ||
|
||
helm: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare | ||
run: | | ||
# OCI standard enforces lower-case paths | ||
GHCR_REPO=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]') | ||
HELM_REPO=$(echo "oci://ghcr.io/${{ github.repository_owner }}/helm-charts" | tr '[:upper:]' '[:lower:]') | ||
echo "GHCR_REPO=$GHCR_REPO" >> $GITHUB_ENV | ||
echo "HELM_REPO=$HELM_REPO" >> $GITHUB_ENV | ||
- name: Publish Helm charts | ||
run: | | ||
cd helm | ||
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | ||
helm package --app-version ${{ needs.build.outputs.release }} --version ${{ needs.build.outputs.release }} safe-settings | ||
helm push safe-settings-${{ needs.build.outputs.release }}.tgz ${{ env.HELM_REPO }} | ||
#trigger-deployment: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: decyjphr-actions/[email protected] | ||
# with: | ||
# workflow: deploy-k8s.yml | ||
# token: ${{ secrets.pat }} | ||
# ref: ${{ github.event.pull_request.head.ref || github.ref }} | ||
# inputs: '{"release": "${{needs.build.outputs.release}}", "status": "passed" }' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.