Skip to content

Commit da11ebd

Browse files
committed
github container registry
1 parent a815a93 commit da11ebd

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.github/workflows/build-images.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,32 @@ name: build-images
44
on:
55
workflow_dispatch: ~
66

7-
env:
8-
DOCKER_BUILDKIT: 1
9-
107
permissions:
11-
packages: write
128
contents: read
139

1410
jobs:
1511

16-
build-test-push:
12+
build-push:
1713
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
env:
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: ${{ github.repository }}/apm-agent-python-testing
1820
steps:
1921

2022
- uses: actions/checkout@v4
2123

2224
- name: Login to ghcr.io
2325
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
2426
with:
25-
registry: ghcr.io
27+
registry: ${{ env.REGISTRY }}
2628
username: ${{ github.actor }}
2729
password: ${{ secrets.GITHUB_TOKEN }}
2830

29-
- run: ./util.sh --action build
31+
- run: ./util.sh --action build --registry ${{ env.REGISTRY }} --image-name ${{ env.IMAGE_NAME }}
3032
working-directory: .ci/docker
3133

32-
- run: ./util.sh --action push
34+
- run: ./util.sh --action push --registry ${{ env.REGISTRY }} --image-name ${{ env.IMAGE_NAME }}
3335
working-directory: .ci/docker

tests/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
4444

4545
WORKDIR /app
4646

47+
# configure the label to help with the GitHub container registry
48+
LABEL org.opencontainers.image.source https://github.com/elastic/apm-agent-python
49+
4750
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

0 commit comments

Comments
 (0)