Skip to content

Commit 2df1e82

Browse files
author
Thomas Luijken
committed
Use secrets immediately
1 parent 0f7b160 commit 2df1e82

2 files changed

Lines changed: 3 additions & 28 deletions

File tree

.github/actions/docker/action.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,9 @@ inputs:
2828
buildArgs:
2929
description: docker extra build arguments
3030
required: false
31-
username:
32-
description: docker container registry username
33-
required: true
34-
password:
35-
description: docker container registry password
36-
required: true
3731
tag:
3832
description: The tag to assign to this container image
3933
required: false
40-
registry:
41-
description: The container registry to push to (defaults to baseflow.azurecr.io)
42-
required: false
43-
default: baseflow.azurecr.io
4434

4535
outputs:
4636
image:
@@ -70,9 +60,9 @@ runs:
7060
- name: Login to Docker Hub
7161
uses: docker/login-action@v3
7262
with:
73-
registry: ${{steps.info.outputs.registry}}
74-
username: ${{inputs.username}}
75-
password: ${{inputs.password}}
63+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
64+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
65+
registry: registry-1.docker.io
7666

7767
- name: determine tag
7868
shell: bash

.github/workflows/BUILD_AND_DEPLOY.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,10 @@ jobs:
3232
run: |
3333
version=$(grep '^version' oxybox/Cargo.toml | head -n 1 | cut -d '"' -f2)
3434
echo "version=$version" >> $GITHUB_OUTPUT
35-
- uses: ./.github/actions/docker
36-
name: Build docker image
37-
with:
38-
username: ${{ secrets.BASEFLOW_ACR_USERNAME }}
39-
password: ${{ secrets.BASEFLOW_ACR_PASSWORD }}
40-
push: ${{ github.event_name != 'pull_request' }}
41-
vulnerability_scan: ${{ github.event_name != 'pull_request' }}
42-
version: ${{ steps.get_version.outputs.version }}
43-
context: ./oxybox
4435
- uses: ./.github/actions/docker
4536
if: github.ref == 'refs/heads/main'
4637
name: Build docker image to docker hub
4738
with:
48-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
49-
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
50-
registry: registry-1.docker.io
5139
repository: baseflow/oxybox
5240
push: ${{ github.event_name != 'pull_request' }}
5341
vulnerability_scan: ${{ github.event_name != 'pull_request' }}
@@ -57,9 +45,6 @@ jobs:
5745
if: github.ref == 'refs/heads/main'
5846
name: Build docker image to docker hub
5947
with:
60-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
61-
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
62-
registry: registry-1.docker.io
6348
push: ${{ github.event_name != 'pull_request' }}
6449
repository: baseflow/oxybox
6550
vulnerability_scan: ${{ github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)