Skip to content

Commit

Permalink
Sol 866: Add permissions section to build job (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
paramids committed Jun 28, 2024
1 parent fd24118 commit 69a2c9b
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/docker-builder-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,33 @@ jobs:
run: |
poetry export -f requirements.txt --output requirements.txt --extras "all"
- id: version
name: Build Version
run: echo "version=$(date -u '+%Y%m%dT%H%M%SZ')" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: cognite/neat:latest, cognite/neat:${{ github.ref_name }}

build-and-push-f25e:
runs-on: ubuntu-latest
environment: main
permissions:
id-token: write
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.4

- name: Azure login
uses: azure/login@v1
Expand All @@ -41,6 +65,14 @@ jobs:
tenant-id: a9ae5b54-3600-4917-a9dc-3020723360b3
subscription-id: fd108646-dc13-4d9a-9b8c-d9dbde664887

- name: Export dependencies
run: |
poetry export -f requirements.txt --output requirements.txt --extras "all"
- id: version
name: Build Version
run: echo "version=$(date -u '+%Y%m%dT%H%M%SZ')" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -53,4 +85,4 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: cognite/neat:latest, cognite/neat:${{ github.ref_name }}, scsproduction.azurecr.io/neat:${{ env.version }}
tags: scsproduction.azurecr.io/neat:${{ env.version }}

0 comments on commit 69a2c9b

Please sign in to comment.