Skip to content

Commit

Permalink
Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuscruz committed Nov 28, 2024
1 parent edff26f commit c3a2280
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,22 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate SHA256 for postgres_primary.dockerfile
id: primary_sha
run: echo "::set-output name=sha256::$(sha256sum postgres_primary.dockerfile | awk '{ print substr($1, 1, 12) }')"
run: echo "PRIMARY_SHA=$(sha256sum postgres_primary.dockerfile | awk '{ print substr($1, 1, 12) }')" >> $GITHUB_ENV

- name: Calculate SHA256 for postgres_replica.dockerfile
id: replica_sha
run: echo "::set-output name=sha256::$(sha256sum postgres_replica.dockerfile | awk '{ print substr($1, 1, 12) }')"
run: echo "REPLICA_SHA=$(sha256sum postgres_replica.dockerfile | awk '{ print substr($1, 1, 12) }')" >> $GITHUB_ENV

- name: Compute container registry name
run: echo "CR_NAME=$(echo ghcr.io/${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Build and tag primary Docker image
run: docker build -f postgres_primary.dockerfile -t $CR_NAME/postgres_primary:${{ steps.primary_sha.outputs.sha256 }} .
run: docker build -f postgres_primary.dockerfile -t $CR_NAME/postgres_primary:${{ env.PRIMARY_SHA }} .

- name: Build and tag replica Docker image
run: docker build -f postgres_replica.dockerfile -t $CR_NAME/postgres_replica:${{ steps.replica_sha.outputs.sha256 }} .
run: docker build -f postgres_replica.dockerfile -t $CR_NAME/postgres_replica:${{ env.REPLICA_SHA }} .

- name: Push primary Docker image
run: docker push $CR_NAME/postgres_primary:${{ steps.primary_sha.outputs.sha256 }}
run: docker push $CR_NAME/postgres_primary:${{ env.PRIMARY_SHA }}

- name: Push replica Docker image
run: docker push $CR_NAME/postgres_replica:${{ steps.replica_sha.outputs.sha256 }}
run: docker push $CR_NAME/postgres_replica:${{ env.REPLICA_SHA }}

0 comments on commit c3a2280

Please sign in to comment.