Skip to content

Commit

Permalink
fix: allow cache push through PAT
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobmoellerdev committed Nov 29, 2024
1 parent b07a7ff commit d779d24
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ env:
components: '["ocmcli", "helminstaller", "helmdemo", "subchartsdemo", "ecrplugin"]'
IMAGE_PLATFORMS: 'linux/amd64 linux/arm64'
PLATFORMS: 'windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64'
BUILDX_CACHE_PUSH: ${{ github.ref == 'refs/heads/main' }}
BUILDX_CACHE_PUSH: true
# BUILDX_CACHE_PUSH: ${{ github.ref == 'refs/heads/main' }}
BUILDX_CACHE_REF_BASE: ghcr.io/${{ github.repository }}/buildx-cache

jobs:
Expand Down Expand Up @@ -70,12 +71,18 @@ jobs:
cache: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with: # OCMBot
app_id: ${{ secrets.OCMBOT_APP_ID }}
private_key: ${{ secrets.OCMBOT_PRIV_KEY }}
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: OCMBot
password: ${{ steps.generate_token.outputs.token }}
- name: Get go environment for use with cache
run: |
echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
Expand Down

0 comments on commit d779d24

Please sign in to comment.