Skip to content

Commit

Permalink
chore: add docker login step to playwright workflow (#1302)
Browse files Browse the repository at this point in the history
Co-authored-by: Timur Olzhabayev <[email protected]>
  • Loading branch information
s4kh and tolzhabayev authored Nov 5, 2024
1 parent e7e2387 commit d945ee7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
needs: [test]
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
include:
Expand Down Expand Up @@ -130,6 +132,19 @@ jobs:
run: npm exec playwright install chromium
working-directory: ./${{ matrix.workingDir }}

- name: Get secrets for DockerHub login
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
common_secrets: |
DOCKERHUB_USERNAME=dockerhub:username
DOCKERHUB_PASSWORD=dockerhub:password
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_PASSWORD }}

- name: Start grafana server for e2e tests
if: ${{ matrix.workingDir != 'myorg-nobackend-scenesapp' }}
run: docker compose up -d
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium

- name: Get secrets for DockerHub login
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
common_secrets: |
DOCKERHUB_USERNAME=dockerhub:username
DOCKERHUB_PASSWORD=dockerhub:password
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_PASSWORD }}

- name: Start Grafana
run: |
cd packages/plugin-e2e
Expand Down

0 comments on commit d945ee7

Please sign in to comment.