Skip to content

Commit

Permalink
[SQUASH] Pass creds to action
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzaadi committed Oct 20, 2024
1 parent 10b104b commit 460624a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/actions/build-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ inputs:
description: Skip docker init (if ran after another invocation of this action)
required: false
default: ''
docker-user:
required: true
description: Docker Hub User
docker-password:
required: true
description: Docker Hub User

runs:
using: 'composite'
Expand All @@ -44,8 +50,8 @@ runs:
if: ${{ inputs.skip-init == '' }}
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_MACHINE_USER }}
password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
username: ${{ inputs.docker-user }}
password: ${{ inputs.docker-password }}

- name: Build Runner Image
uses: docker/build-push-action@v6
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflows: ["Build infra images"]
types:
- completed
pull_request:
workflow_dispatch:

jobs:
prepare-matrix:
Expand Down Expand Up @@ -102,3 +104,5 @@ jobs:
build-args: |
BUILD_CONTEXT=${{ steps.prepare_tags.outputs.context_dir }}
INTEGRATION_VERSION=${{ steps.prepare_tags.outputs.version }}
docker-user: ${{ secrets.DOCKER_MACHINE_USER }}
docker-password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
dockerfile: ./integrations/_infra/Dockerfile.base.builder
platforms: linux/amd64,linux/arm64
tags: ghcr.io/port-labs/port-ocean-base-builder:latest
docker-user: ${{ secrets.DOCKER_MACHINE_USER }}
docker-password: ${{ secrets.DOCKER_MACHINE_TOKEN }}


- name: Build Docker Image
uses: ./.github/workflows/actions/build-docker-image
with:
dockerfile: ./integrations/_infra/Dockerfile.base.runner
platforms: linux/amd64,linux/arm64
tags: ghcr.io/port-labs/port-ocean-base-runner:latest
docker-user: ${{ secrets.DOCKER_MACHINE_USER }}
docker-password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
skip-init: 'yupp'

0 comments on commit 460624a

Please sign in to comment.