Skip to content

Commit

Permalink
added .env
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnjau committed Nov 7, 2024
1 parent dd2edec commit a7a5d6a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
branches:
- development

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
REPOSITORY_NAME: openchanjo_gateway

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -41,11 +46,8 @@ jobs:
# Step 5: Build and tag the Docker image
- name: Build and tag Docker image
run: |
DOCKERHUB_USERNAME="${{ secrets.DOCKERHUB_USERNAME }}"
DOCKERHUB_PASSWORD="${{ secrets.DOCKERHUB_PASSWORD }}"
REPOSITORY_NAME="openchanjo_gateway"
IMAGE_TAG="${DOCKERHUB_USERNAME}/${REPOSITORY_NAME}:${{ env.PLATFORM }}"
echo '${{ DOCKERHUB_PASSWORD }}' | docker login -u ${{ DOCKERHUB_USERNAME }} --password-stdin
IMAGE_TAG="${ env.DOCKERHUB_USERNAME }/${ env.REPOSITORY_NAME }:${{ env.PLATFORM }}"
echo '${{ env.DOCKERHUB_PASSWORD }}' | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin
docker buildx create --use --name workflowBuilder
docker buildx build --platform=linux/amd64,linux/arm64 -t ${{ env.$IMAGE_TAG }} --push .
docker logout

0 comments on commit a7a5d6a

Please sign in to comment.