Skip to content

Commit

Permalink
Set local repositories as build-time repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
hpedrorodrigues committed Feb 18, 2025
1 parent 7bf19f3 commit 2277c63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/_shared_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ jobs:
username: ${{ inputs.owner }}
password: ${{ secrets.dh_token }}
- name: Publish to Docker Hub
uses: chainguard-images/actions/apko-snapshot@main
# We can uncomment the following line once this pull request is merged:
# https://github.com/chainguard-images/actions/pull/165
# uses: chainguard-images/actions/apko-snapshot@main
uses: hpedrorodrigues/chainguard-images-actions/apko-snapshot@dev
with:
config: ${{ inputs.image }}/${{ inputs.image }}.apko.yaml
base-tag: docker.io/${{ inputs.owner }}/${{ inputs.image }}
Expand All @@ -72,7 +75,7 @@ jobs:
generic-pass: ${{ secrets.dh_token }}
annotations: org.opencontainers.image.revision:${{ inputs.revision }},org.opencontainers.image.created:${{ steps.source-date.outputs.date }},org.opencontainers.image.version:${{ inputs.version }}
source-date-epoch: ${{ steps.source-date.outputs.epoch }}
repository-append: ${{ github.workspace }}/${{ inputs.image }}/packages
build-repository-append: ${{ github.workspace }}/${{ inputs.image }}/packages
keyring-append: ${{ inputs.melange_package && format('{0}/melange.rsa.pub', github.workspace) || '' }}
publish-to-github-container-registry:
name: Publish to GitHub Container Registry (${{ inputs.image }})
Expand Down Expand Up @@ -104,7 +107,10 @@ jobs:
echo "epoch=$(date -u +%s)" >> ${GITHUB_OUTPUT}
shell: sh
- name: Publish to GitHub Container Registry
uses: chainguard-images/actions/apko-snapshot@main
# We can uncomment the following line once this pull request is merged:
# https://github.com/chainguard-images/actions/pull/165
# uses: chainguard-images/actions/apko-snapshot@main
uses: hpedrorodrigues/chainguard-images-actions/apko-snapshot@dev
with:
config: ${{ inputs.image }}/${{ inputs.image }}.apko.yaml
base-tag: ghcr.io/${{ inputs.owner }}/${{ inputs.image }}
Expand All @@ -116,5 +122,5 @@ jobs:
generic-pass: ${{ secrets.gcr_token }}
annotations: org.opencontainers.image.revision:${{ inputs.revision }},org.opencontainers.image.created:${{ steps.source-date.outputs.date }},org.opencontainers.image.version:${{ inputs.version }}
source-date-epoch: ${{ steps.source-date.outputs.epoch }}
repository-append: ${{ github.workspace }}/${{ inputs.image }}/packages
build-repository-append: ${{ github.workspace }}/${{ inputs.image }}/packages
keyring-append: ${{ inputs.melange_package && format('{0}/melange.rsa.pub', github.workspace) || '' }}
3 changes: 2 additions & 1 deletion hadolint/hadolint.apko.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
contents:
build_repositories:
- '@local packages'
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- '@local packages'
packages:
- alpine-baselayout-data
- hadolint
Expand Down
3 changes: 2 additions & 1 deletion prettier/prettier.apko.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
contents:
build_repositories:
- '@local packages'
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- '@local packages'
packages:
- alpine-baselayout-data
- prettier
Expand Down

0 comments on commit 2277c63

Please sign in to comment.