Skip to content

Commit

Permalink
permissions change
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathchandra24 committed Mar 3, 2024
1 parent d223c8a commit 9c29997
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 48 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/build-op-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,62 +70,62 @@ jobs:
echo "IMAGE_NAME=${{ env.GITHUB_IMAGE }}" >> $GITHUB_OUTPUT
echo "DOCKER_IMG_NAME=${{env.DOCKER_REPO}}/${{ env.DOCKER_IMAGE }}" >> $GITHUB_OUTPUT
# operator-build:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# name: Build Image for Fluent Operator
# needs:
# - build-image-metadata
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
operator-build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build Image for Fluent Operator
needs:
- build-image-metadata
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# context: .
# file: ./cmd/fluent-manager/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# tags: ${{ needs.build-image-metadata.outputs.tags }}
# labels: ${{ needs.build-image-metadata.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./cmd/fluent-manager/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ needs.build-image-metadata.outputs.tags }}
labels: ${{ needs.build-image-metadata.outputs.labels }}

# scan-operator-image:
# name: Scan Docker Image
# needs:
# - operator-build
# - build-image-metadata
# uses: ./.github/workflows/call-scan-images.yaml
# with:
# source_image: "${{ needs.build-image-metadata.outputs.IMG_NAME }}:${{ needs.build-image-metadata.outputs.version }}"
# source_registry: ghcr.io
# platforms: '["linux/arm64", "linux/amd64"]'
# secrets:
# registry_username: ${{ github.actor }}
# registry_password: ${{ secrets.GITHUB_TOKEN }}
scan-operator-image:
name: Scan Docker Image
needs:
- operator-build
- build-image-metadata
uses: ./.github/workflows/call-scan-images.yaml
with:
source_image: "${{ needs.build-image-metadata.outputs.IMG_NAME }}:${{ needs.build-image-metadata.outputs.version }}"
source_registry: ghcr.io
platforms: '["linux/arm64", "linux/amd64"]'
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}

release-image-to-docker-hub:
if: always()
name: Release Image to Docker Hub
uses: ./.github/workflows/call-clone-images.yaml
needs:
# - operator-build
# - scan-operator-image
- operator-build
- scan-operator-image
- build-image-metadata
with:
source_image: "${{ needs.build-image-metadata.outputs.IMG_NAME }}:${{ needs.build-image-metadata.outputs.version }}"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/call-clone-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@

jobs:
check-image-exists:
permissions:
contents: read
packages: read
strategy:
matrix:
platform: ${{ fromJson(inputs.platforms) }}
Expand Down

0 comments on commit 9c29997

Please sign in to comment.