diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b0cc9a867..e95932c81 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,27 +1,26 @@ name: Build and test - on: - push: + push: jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Setup node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - registry-url: 'https://npm.pkg.github.com' - cache: 'npm' - - name: Install dependencies - run: npm ci --ignore-scripts - env: - NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} - - name: Run linting - run: npm run lint - - name: Build application - run: npm run build-local - - name: Run tests - run: npm run test + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: 'https://npm.pkg.github.com' + cache: 'npm' + - name: Install dependencies + run: npm ci --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} + - name: Run linting + run: npm run lint + - name: Build application + run: npm run build-local + - name: Run tests + run: npm run test diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 708e676b9..46c3eb785 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -1,136 +1,136 @@ name: Build docker image on: - workflow_call: - inputs: - environment: - required: true - type: string - imagename: - required: true - type: string - ENV: - required: true - type: string - ADMIN_ORIGIN: - required: true - type: string - APP_ORIGIN: - required: true - type: string - REVALIDATOR_PROXY_ORIGIN: - required: true - type: string - DECORATOR_URL: - required: true - type: string - XP_ORIGIN: - required: true - type: string - TELEMETRY_URL: - required: true - type: string - INNLOGGINGSSTATUS_URL: - required: true - type: string - MELDEKORT_API_URL: - required: true - type: string - NAVNO_SEARCH_API_URL: - required: true - type: string - FAILOVER_ORIGIN: - required: true - type: string - RELEASE_TAG: - required: false - type: string - IS_FAILOVER_INSTANCE: - required: false - type: boolean - NODE_ENV: - required: true - type: string - secrets: - READER_TOKEN: - required: true - SERVICE_SECRET: - required: false - NAIS_WORKLOAD_IDENTITY_PROVIDER: - required: true - outputs: - image: - description: "Url to docker image" - value: ${{ jobs.build_image.outputs.image }} + workflow_call: + inputs: + environment: + required: true + type: string + imagename: + required: true + type: string + ENV: + required: true + type: string + ADMIN_ORIGIN: + required: true + type: string + APP_ORIGIN: + required: true + type: string + REVALIDATOR_PROXY_ORIGIN: + required: true + type: string + DECORATOR_URL: + required: true + type: string + XP_ORIGIN: + required: true + type: string + TELEMETRY_URL: + required: true + type: string + INNLOGGINGSSTATUS_URL: + required: true + type: string + MELDEKORT_API_URL: + required: true + type: string + NAVNO_SEARCH_API_URL: + required: true + type: string + FAILOVER_ORIGIN: + required: true + type: string + RELEASE_TAG: + required: false + type: string + IS_FAILOVER_INSTANCE: + required: false + type: boolean + NODE_ENV: + required: true + type: string + secrets: + READER_TOKEN: + required: true + SERVICE_SECRET: + required: false + NAIS_WORKLOAD_IDENTITY_PROVIDER: + required: true + outputs: + image: + description: 'Url to docker image' + value: ${{ jobs.build_image.outputs.image }} jobs: - build_image: - name: Build docker image - runs-on: ubuntu-latest - permissions: - contents: "read" - id-token: "write" - environment: ${{ inputs.environment }} - outputs: - image: ${{ steps.docker-push.outputs.image }} - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Setup node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://npm.pkg.github.com' - cache: 'npm' - - name: Set app environmment - run: | - cat > .env < .env <> $GITHUB_ENV + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + target_commitish: main + tag_name: release/prod@${{ env.TAG_NAME }} # Generates a unique tag using timestamp + name: Release ${{ github.ref_name }} + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # This is a PAT with repo permissions diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 8d98c0998..000000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -**/*.yml \ No newline at end of file