Skip to content

Commit

Permalink
refactor(.github/workflows): streamline YAML syntax and update reposi…
Browse files Browse the repository at this point in the history
…tory URL

1. The YAML syntax in the GitHub Actions workflow files has been streamlined by replacing multiline run commands with single-line commands using the '>' character. This change simplifies the readability and maintenance of the workflow files.
2. The repository URL in the test_deploy.yaml file has been updated to use a shorthand syntax. This change makes the configuration cleaner and aligns with common practices for specifying GitHub repositories in workflows.
  • Loading branch information
cybersiddhu committed Jun 27, 2024
1 parent ef7a355 commit dd615b5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
49 changes: 24 additions & 25 deletions .github/workflows/deploy-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,22 @@ jobs:
key: ${{ runner.os }}-${{ steps.dag_check.outputs.dagger_version}}-${{ steps.dag_check.outputs.dagger_bin_checksum }}
- name: buid and push container image
id: app_container
run: |
dagger call -m github.com/dictybase-docker/dagger-of-dcr/container-image@main \
with-image \
--image=${{ inputs.image }} \
with-ref \
--ref=${{ inputs.ref }} \
with-dockerfile \
--docker-file=${{ inputs.dockerfile }} \
with-namespace \
--namespace=${{ inputs.namespace }} \
with-repository \
--repository=${{ format('https://github.com/{0}',inputs.repository) }} \
publish-from-repo \
--user=${{ secrets.DOCKERHUB_USER }} \
run: >
dagger call -m github.com/dictybase-docker/dagger-of-dcr/container-image@main
with-image
--image=${{ inputs.image }}
with-ref
--ref=${{ inputs.ref }}
with-dockerfile
--docker-file=${{ inputs.dockerfile }}
with-namespace
--namespace=${{ inputs.namespace }}
with-repository
--repository=${{ format('https://github.com/{0}',inputs.repository) }}
publish-from-repo
--user=${{ secrets.DOCKERHUB_USER }}
--password=${{ secrets.DOCKER_PASS }} > /tmp/image.txt
echo "image=$(cat /tmp/image.txt)" >> $GITHUB_OUTPUT
&& echo "image=$(cat /tmp/image.txt)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
Expand All @@ -120,15 +119,15 @@ jobs:
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}

- name: export kubectl
run: |
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@main \
call with-kops \
with-kubectl \
with-cluster \
--name=${{ inputs.cluster }} \
--credentials=${{ steps.gcp_authentication.outputs.credentials_file_path }} \
--storage=${{ inputs.cluster_state_storage }} \
export-kubectl \
run: >
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@main
call with-kops
with-kubectl
with-cluster
--name=${{ inputs.cluster }}
--credentials=${{ steps.gcp_authentication.outputs.credentials_file_path }}
--storage=${{ inputs.cluster_state_storage }}
export-kubectl
--output=$KUBECTL_CONFIG
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
cluster: secrets.DEV_STAGING_CLUSTER
cluster_state_storage: secrets.DEV_STAGING_KOPS_STATE_STORAGE
repository: "https://github.com/dictyBase/static-server.git"
repository: dictyBase/static-server.git
image: goran
ref: 5041b41
dockerfile: Dockerfile
Expand Down

0 comments on commit dd615b5

Please sign in to comment.