Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(worker): fix broken ecs worker image version push #2527

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/docker-ecs-worker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ permissions:
jobs:
build_docker_image:
runs-on: ubuntu-latest
env:
# From PR's this is overridden by a head ref by the caller workflow. defaults to commit sha when not passed (e.g. workflow_dispatch or call from main branch)
WORKER_VERSION: ${{ inputs.ref || github.sha }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -27,9 +30,10 @@ jobs:

- name: Show git ref
run: |
echo ${{ github.ref }}
echo ${{ github.event.pull_request.head.sha }}
echo ${{ github.sha }}
echo GITHUB REF ${{ github.ref }}
echo GITHUB PR HEAD SHA ${{ github.event.pull_request.head.sha }}
echo GITHUB SHA ${{ github.sha }}
echo WORKER_VERSION ENV ${{ env.WORKER_VERSION }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -56,8 +60,8 @@ jobs:

- name: Build the Docker image
run: |
docker build . --build-arg="WORKER_VERSION=${{ github.sha }}" --tag public.ecr.aws/d8a4z9o5/artillery-worker:${{ github.sha }} -f ./packages/artillery/lib/platform/aws-ecs/worker/Dockerfile
docker build . --build-arg="WORKER_VERSION=${{ env.WORKER_VERSION }}" --tag public.ecr.aws/d8a4z9o5/artillery-worker:${{ env.WORKER_VERSION }} -f ./packages/artillery/lib/platform/aws-ecs/worker/Dockerfile

- name: Push Docker image
run: |
docker push public.ecr.aws/d8a4z9o5/artillery-worker:${{ github.sha }}
docker push public.ecr.aws/d8a4z9o5/artillery-worker:${{ env.WORKER_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/run-aws-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run-tests:
if: contains( github.event.pull_request.labels.*.name, 'run-aws-tests' )
needs: publish-branch-image
timeout-minutes: 40
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
Loading