chore(docker): bump google/cloud-sdk from 454.0.0-alpine to 455.0.0-alpine #74
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Verify pull request | |
"on": | |
pull_request: | |
branches: | |
- "master" | |
types: | |
- "opened" | |
- "reopened" | |
- "synchronize" | |
paths: | |
- "Dockerfile" | |
- "run.sh" | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
verify_pull_request: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
if: ${{ github.event.pull_request.draft == false }} | |
env: | |
image_tag: "tungbeier/gcloud-pubsub-emulator:test" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
load: true | |
tags: ${{ env.image_tag }} | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Verify image | |
env: | |
project: 'test-project' | |
topic: 'test-topic' | |
subscription: 'test-subscription' | |
run: | | |
docker run --detach --rm \ | |
--name emulator \ | |
--publish 8681:8681 \ | |
--env PUBSUB_PROJECT1=${{ env.project }},${{ env.topic }} \ | |
${{ env.image_tag }} | |
export PUBSUB_EMULATOR_HOST=localhost:8681 | |
cd .github/workflows/python-pubsub | |
echo "[INFO] Install python requirements" | |
pip install -q -r requirements.txt | |
echo "[INFO] Create pull subscription" | |
python subscriber.py ${{ env.project }} create ${{ env.topic }} ${{ env.subscription }} | |
echo "[INFO] Publish message" | |
python publisher.py ${{ env.project }} publish ${{ env.topic }} | |
echo "[INFO] Receive message" | |
python subscriber.py ${{ env.project }} receive ${{ env.subscription }} 10 |