Skip to content

feat: add support for base64 encoded docker password#8

Open
nianyush wants to merge 6 commits into
Luet-lab:masterfrom
nianyush:docker-password-base64
Open

feat: add support for base64 encoded docker password#8
nianyush wants to merge 6 commits into
Luet-lab:masterfrom
nianyush:docker-password-base64

Conversation

@nianyush

@nianyush nianyush commented Aug 5, 2025

Copy link
Copy Markdown

No description provided.

@nianyush nianyush force-pushed the docker-password-base64 branch from 57173f8 to e3a1c32 Compare August 5, 2025 22:57
@nianyush

nianyush commented Aug 5, 2025

Copy link
Copy Markdown
Author

@Itxaka @mudler Can you help to review this? For GCR registry, its service token is a json file which doesnt work well to directly pass it through github inputs unless i base64 encoded it

@nianyush nianyush force-pushed the docker-password-base64 branch from 59bf278 to 01d2d1a Compare August 6, 2025 00:55
@nianyush nianyush force-pushed the docker-password-base64 branch from 01d2d1a to 1344170 Compare August 6, 2025 00:56
Comment thread main.go Outdated
}
}

githubactions.SetOutput("packages", packagesMatrix.String())

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By adding this, we can just run the action with pretend: true for the first time to generate a matrix of packages to be built, and then use that matrix in github workflow to build all those packages in parallel

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this

name: Reusable Publish


jobs:
  generate-packages:
    runs-on: ubuntu-latest
    outputs:
      packages: ${{ steps.packages.outputs.packages }}
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v3
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
    - name: Prepare
      id: prepare
      run: |
        mkdir build
    - name: Download meta 🔧
      uses: nianyush/luet-github-action@docker-password-base64
      with:
        FINAL_REPO: ${{ inputs.image_repo }}
        REPOSITORY_TYPE: docker
        downloadAllMeta: true
        downloadFromList: false
        downloadMeta: true
        # renovate: datasource=github-releases depName=mudler/luet
        luetVersion: 0.36.0
    - name: Generate packages 🔧
      uses: nianyush/luet-github-action@docker-password-base64
      id: packages
      with:
        build: true
        buildx: true
        pretend: true
  build:
    runs-on: ubuntu-latest
    needs: [generate-packages]
    strategy:
      matrix: ${{ fromJson(needs.generate-packages.outputs.packages) }}
    env:
      ARCH: ${{ inputs.arch }}
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v3
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
    - name: Prepare
      id: prepare
      run: |
        mkdir build
    - name: Download meta 🔧
      uses: nianyush/luet-github-action@docker-password-base64
      with:
        FINAL_REPO: ${{ inputs.image_repo }}
        REPOSITORY_TYPE: docker
        downloadAllMeta: true
        downloadFromList: false
        downloadMeta: true
        # renovate: datasource=github-releases depName=mudler/luet
        luetVersion: 0.36.0
    - name: Build packages 🔧
      uses: nianyush/luet-github-action@docker-password-base64
      with:
        CURRENT_PACKAGE: ${{ matrix.package }}
        build: true
        buildx: true
        platform: linux/${{ inputs.arch }}
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant