Skip to content

Commit 460624a

Browse files
committed
[SQUASH] Pass creds to action
1 parent 10b104b commit 460624a

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/actions/build-docker-image/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ inputs:
2323
description: Skip docker init (if ran after another invocation of this action)
2424
required: false
2525
default: ''
26+
docker-user:
27+
required: true
28+
description: Docker Hub User
29+
docker-password:
30+
required: true
31+
description: Docker Hub User
2632

2733
runs:
2834
using: 'composite'
@@ -44,8 +50,8 @@ runs:
4450
if: ${{ inputs.skip-init == '' }}
4551
with:
4652
registry: ghcr.io
47-
username: ${{ secrets.DOCKER_MACHINE_USER }}
48-
password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
53+
username: ${{ inputs.docker-user }}
54+
password: ${{ inputs.docker-password }}
4955

5056
- name: Build Runner Image
5157
uses: docker/build-push-action@v6

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
workflows: ["Build infra images"]
55
types:
66
- completed
7+
pull_request:
8+
workflow_dispatch:
79

810
jobs:
911
prepare-matrix:
@@ -102,3 +104,5 @@ jobs:
102104
build-args: |
103105
BUILD_CONTEXT=${{ steps.prepare_tags.outputs.context_dir }}
104106
INTEGRATION_VERSION=${{ steps.prepare_tags.outputs.version }}
107+
docker-user: ${{ secrets.DOCKER_MACHINE_USER }}
108+
docker-password: ${{ secrets.DOCKER_MACHINE_TOKEN }}

.github/workflows/infra.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ jobs:
2121
dockerfile: ./integrations/_infra/Dockerfile.base.builder
2222
platforms: linux/amd64,linux/arm64
2323
tags: ghcr.io/port-labs/port-ocean-base-builder:latest
24+
docker-user: ${{ secrets.DOCKER_MACHINE_USER }}
25+
docker-password: ${{ secrets.DOCKER_MACHINE_TOKEN }}
26+
2427

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

0 commit comments

Comments
 (0)