Skip to content

Restore packages: write permission required by armada publish reusable #249

Restore packages: write permission required by armada publish reusable

Restore packages: write permission required by armada publish reusable #249

name: Deploy to Development
concurrency:
group: development-concurrency
cancel-in-progress: true
permissions:
contents: read
packages: write
on:
push:
branches:
- "main"
jobs:
get-short-sha:
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- id: get-tag
run: |
SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-8)
echo "tag=$SHA_SHORT" >> "$GITHUB_OUTPUT"
build-and-push-dev-image-to-robotics-staging-registry:

Check failure on line 27 in .github/workflows/deploy_to_development.yml

View workflow run for this annotation

GitHub Actions / Deploy to Development

Invalid workflow file

The workflow is not valid. .github/workflows/deploy_to_development.yml (Line: 27, Col: 3): Error calling workflow 'equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main'. The workflow is requesting 'packages: write', but is only allowed 'packages: none'. .github/workflows/deploy_to_development.yml (Line: 27, Col: 3): Error calling workflow 'equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main'. The nested job 'build-and-push-docker-image-to-container-registry' is requesting 'packages: write', but is only allowed 'packages: none'.
name: Build and push dev image to robotics staging container registry
needs: get-short-sha
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
permissions:
contents: read
with:
registry: roboticsstagingacr.azurecr.io
image_name: robotics/isar-robot
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
secondary_tag: dev
path_to_dockerfile: Dockerfile
path_to_context: .
secrets:
registry_password: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_PASSWORD }}
registry_username: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_USERNAME }}
deploy:
name: Update deployment in Development
needs: [build-and-push-dev-image-to-robotics-staging-registry, get-short-sha]
uses: equinor/armada/.github/workflows/update_kubernetes_deployment.yml@main
with:
environment: development
registry: roboticsstagingacr.azurecr.io
image_name: robotics/isar-robot
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
author_email: ${{ github.event.head_commit.author.email }}
author_name: ${{ github.event.head_commit.author.name }}
infrastructure_repository: equinor/robotics-infrastructure
secrets:
deploy_key: ${{ secrets.ROBOTICS_INFRASTRUCTURE_DEPLOY_KEY }}