-
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.
Update workflows, add branch deploy option
- Loading branch information
1 parent
8527ec7
commit f5af3c1
Showing
5 changed files
with
101 additions
and
131 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 'Bygg og deploy branch til dev-gcp' | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_push: | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
- name: 'Setup Java' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 21 | ||
cache: 'gradle' | ||
- name: 'Build code' | ||
run: | | ||
./gradlew build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: 'Build and push docker image' | ||
uses: nais/docker-build-push@v0 | ||
id: docker-push | ||
with: | ||
team: pensjonopptjening | ||
tag: ${{ github.sha }}-${{ github.ref_name }} | ||
image_suffix: ${{ github.ref_name }} | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # required, but is defined as an organization variable | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # required, but is defined as an organization secret | ||
- name: 'Deploy til dev-gcp' | ||
uses: nais/deploy/actions/deploy@v2 | ||
env: | ||
RESOURCE: nais/dev-gcp.yml,nais/unleash-apitoken-dev-gcp.yml | ||
CLUSTER: dev-gcp | ||
IMAGE: ${{ steps.docker-push.outputs.image }} | ||
TELEMETRY: ${{ steps.docker-push.outputs.telemetry }} |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: 'Bygg og deploy til prod-gcp og dev-gcp' | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_and_push: | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
- name: 'Setup Java' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 21 | ||
cache: 'gradle' | ||
- name: 'Build code' | ||
run: | | ||
./gradlew build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: 'Build and push docker image' | ||
uses: nais/docker-build-push@v0 | ||
id: docker-push | ||
with: | ||
team: pensjonopptjening | ||
tag: ${{ github.sha }} | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # required, but is defined as an organization variable | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # required, but is defined as an organization secret | ||
- name: 'Deploy til dev-gcp' | ||
uses: nais/deploy/actions/deploy@v2 | ||
env: | ||
RESOURCE: nais/dev-gcp.yml,nais/unleash-apitoken-dev-gcp.yml | ||
CLUSTER: dev-gcp | ||
IMAGE: ${{ steps.docker-push.outputs.image }} | ||
TELEMETRY: ${{ steps.docker-push.outputs.telemetry }} | ||
- name: 'Deploy til prod-gcp' | ||
uses: nais/deploy/actions/deploy@v2 | ||
env: | ||
RESOURCE: nais/prod-gcp.yml,nais/unleash-apitoken-prod-gcp.yml | ||
CLUSTER: prod-gcp | ||
IMAGE: ${{ steps.docker-push.outputs.image }} | ||
TELEMETRY: ${{ steps.docker-push.outputs.telemetry }} |
This file was deleted.
Oops, something went wrong.