Skip to content

Commit

Permalink
chore: retrieve docker user and token from aws and login to docker (#131
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Sunny Guduru authored Apr 5, 2024
1 parent 7e48d0b commit 5f5479e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
16 changes: 9 additions & 7 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ outputs:
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386
- name: Login to Docker
shell: bash
run: |
echo $DOCKER_TOKEN | docker login --username $DOCKER_USERNAME --password-stdin
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ jobs:
outputs:
hashes: ${{ steps.publish.outputs.hashes }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0

- id: publish
uses: ./.github/actions/publish

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.1
name: 'Get Docker token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/global/services/docker/public/username = DOCKER_USERNAME, /global/services/docker/public/token = DOCKER_TOKEN'

- uses: ./.github/actions/publish
with:
dry-run: 'false'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 5f5479e

Please sign in to comment.