Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Rajpal Chauhan <[email protected]>
  • Loading branch information
rajpalc7 committed Jan 26, 2024
1 parent a36c283 commit 2ac576f
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,25 @@ jobs:
with:
repository: ${{ matrix.GIT_REPO_URL }}

- name: List Directories
run: |
ls -l
echo $service
env:
service: ${{ matrix.service }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Pull docker base image and Create Docker file
run: |
docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
docker pull "${BASE_IMAGE}"
mkdir ${context} && cd ${context}
echo "FROM ${BASE_IMAGE}" > Dockerfile
echo "RUN chown 1001:root /usr/bin/caddy" >> Dockerfile
if: contains(fromJSON('["aries-endorser-proxy"]'), matrix.service)
env:
context: ${{ matrix.SOURCE_CONTEXT_DIR }}
BASE_IMAGE: "artifacts.developer.gov.bc.ca/docker-remote/caddy:latest"
REGISTRY_USERNAME: ${{ secrets.USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.PASSWORD }}

- name: Log in to the GHCR
uses: docker/login-action@v2
with:
Expand All @@ -91,19 +101,7 @@ jobs:
if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service)
env:
service: ${{ matrix.service }}

- name: Pull docker base image and Create Docker file
run: |
docker pull -e REGISTRY_USERNAME -e REGISTRY_PASSWORD "${BASE_IMAGE}"
mkdir ${context} && cd ${context}
echo "FROM ${BASE_IMAGE}" > Dockerfile
echo "RUN chown 1001:root /usr/bin/caddy" >> Dockerfile
if: contains(fromJSON('["aries-endorser-proxy"]'), matrix.service)
env:
context: ${{ matrix.SOURCE_CONTEXT_DIR }}
BASE_IMAGE: "artifacts.developer.gov.bc.ca/docker-remote/caddy:latest"
REGISTRY_USERNAME: ${{ secrets.USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.PASSWORD }}


- name: Build and push Docker image
id: docker_build
Expand Down

0 comments on commit 2ac576f

Please sign in to comment.