Skip to content

Commit

Permalink
refactor(workflows): remove GitHub Container Registry login
Browse files Browse the repository at this point in the history
Remove GitHub Container Registry login steps from release and main
workflows to streamline the process. Add login step to env action for
consistency.
  • Loading branch information
flemzord committed Sep 26, 2024
1 parent 55f5c80 commit a19c873
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
9 changes: 5 additions & 4 deletions .github/actions/env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ runs:
github-token: ${{ inputs.token }}
version: "latest"
use-cache: true
- name: Cache Earthly
uses: actions/cache@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
path: /tmp/earthly
key: ${{ runner.os }}-earthly
registry: ghcr.io
username: "NumaryBot"
password: ${{ inputs.token }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
token: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: >
earthly
--use-inline-cache --save-inline-cache --remote-cache=ghcr.io/formancehq/earthly --push
--allow-privileged
--secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
Expand Down Expand Up @@ -92,12 +93,6 @@ jobs:
uses: ./.github/actions/env
with:
token: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: >
earthly
--no-output --use-inline-cache --save-inline-cache --remote-cache=ghcr.io/formancehq/earthly --push
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ jobs:
uses: ./.github/actions/env
with:
token: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: >
earthly
--no-output --use-inline-cache --save-inline-cache --remote-cache=ghcr.io/formancehq/earthly --push
Expand Down

0 comments on commit a19c873

Please sign in to comment.