Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix publish-docker-images workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Oct 15, 2024
1 parent 5220533 commit 82c2381
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,38 @@ jobs:
working-directory: ${{ matrix.working_directory || '.' }}
steps:

- uses: elastic/apm-pipeline-library/.github/actions/github-token@main
- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
app_id: ${{ secrets.ELASTIC_OBSERVABILITY_APP_ID }}
private_key: ${{ secrets.ELASTIC_OBSERVABILITY_APP_PEM }}
permissions: >-
{
"contents": "read",
}
repositories: >-
["${{ matrix.repository }}"]
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repository }}
token: ${{ env.GITHUB_TOKEN }}
token: ${{ steps.get_token.outputs.token }}
ref: ${{ matrix.branch }}

- uses: elastic/apm-pipeline-library/.github/actions/docker-login@main
- name: Login to docker.elastic.co
uses: docker/login-action@v3
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}

- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
- name: Login to dockerhub
uses: docker/login-action@v3
with:
registry: docker.io
secret: secret/observability-team/ci/elastic-observability-dockerhub
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
registry: ${{ secrets.DOCKERHUB_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Prepare
if: ${{ matrix.prepare_script }}
Expand Down

0 comments on commit 82c2381

Please sign in to comment.