Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sol 866: Add permissions section to build job #525

Merged
merged 10 commits into from
Jun 28, 2024
42 changes: 37 additions & 5 deletions .github/workflows/docker-builder-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,49 @@ 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.1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update that to the latest, if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to latest release version 1.3.4


- name: Azure login
uses: azure/login@v1
with:
client-id: 9c8d1e31-54b5-4156-b1d0-408135e2b55b
client-id: 7e26ba04-3da0-4241-b517-c12b8205af8a
pavelzubarev marked this conversation as resolved.
Show resolved Hide resolved
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 }}
Loading