diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..be6dc35 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + target-branch: master diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml new file mode 100644 index 0000000..b70e1a9 --- /dev/null +++ b/.github/workflows/build-and-push.yaml @@ -0,0 +1,38 @@ +name: Build and push artifacts + +on: + push: + tags: + - "v*" + +permissions: + contents: write + pull-requests: write + +jobs: + build-and-push: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Login to ACR + uses: MapColonies/artifactory-login@v1.0.0 + with: + username: ${{ secrets.ACR_PUSH_USER }} + password: ${{ secrets.ACR_PUSH_TOKEN }} + registry: acrarolibotnonprod.azurecr.io + + - name: Build and Push Helm Chart + uses: MapColonies/build-and-push-helm@v1.0.1 + with: + domain: raster + project: ${{ github.repository }} + tag: ${{ github.ref_name }} + registry_url: acrarolibotnonprod.azurecr.io + + - name: Update Artifacts File + uses: MapColonies/update-artifacts-file@v1.1.1 + with: + domain: raster + project: ${{ github.repository }} + tag: ${{ github.ref_name }} diff --git a/.github/workflows/build_and_push.yaml b/.github/workflows/build_and_push.yaml deleted file mode 100644 index 4d1f865..0000000 --- a/.github/workflows/build_and_push.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build and push artifacts - -on: - push: - tags: - - "v*" - - workflow_dispatch: - inputs: - version: - description: "Version to tag the helm chart with" - required: true - type: string -env: - HELM_EXPERIMENTAL_OCI: 1 - -permissions: - contents: write - pull-requests: write - -jobs: - build_and_push_helm: - uses: MapColonies/shared-workflows/.github/workflows/build-and-push-helm.yaml@v5 - secrets: inherit - with: - scope: raster diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 5eec618..f6d8887 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -3,12 +3,19 @@ name: CI on: [pull_request] jobs: + helm-lint: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: azure/setup-helm@v4 + - run: helm lint ./helm + security: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@master - - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/node@master - continue-on-error: true - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + - uses: actions/checkout@v4 + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/node@master + continue-on-error: true + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000..bc2af7c --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,19 @@ +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GH_PAT }} diff --git a/.gitignore b/.gitignore index 8b6ae01..fb0d949 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,6 @@ dist .pnp.* local.yaml + +# helm +Chart.lock diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..48fbed9 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "2.1.1" +} diff --git a/helm/Chart.lock b/helm/Chart.lock deleted file mode 100644 index 545de05..0000000 --- a/helm/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: nginx - repository: oci://acrarolibotnonprod.azurecr.io/helm - version: 1.3.0 -digest: sha256:1b5c95baae34899175d5b8decc47f1609a885c1b6cda49dc6e16e86f0bab990f -generated: "2024-05-27T14:04:45.062949843+03:00" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..d1ec716 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "simple", + "include-component-in-tag": false, + "packages": { + ".": { + "extra-files": [ + { + "type": "yaml", + "path": "helm/Chart.yaml", + "jsonpath": "$.version" + }, + { + "type": "yaml", + "path": "helm/Chart.yaml", + "jsonpath": "$.appVersion" + } + ] + } + } +}