Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/oci-automatic-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish automatic OCI build example
on:
push:
branches: [main, AKO-285]
paths:
- containers/oci-automatic-build/Dockerfile
- .github/workflows/oci-automatic-build.yml
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/uffescience/akoflow-examples/oci-automatic-build
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and verify the example
run: |
docker build --platform linux/amd64 --tag "$IMAGE:sha-$GITHUB_SHA" containers/oci-automatic-build
docker run --rm --network none "$IMAGE:sha-$GITHUB_SHA" | grep -Fx 'Akoflow built this OCI image automatically before execution.'
- name: Push the verified image
run: docker push "$IMAGE:sha-$GITHUB_SHA"
4 changes: 4 additions & 0 deletions containers/oci-automatic-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM alpine@sha256:469c9ea410b9215eaee7976ba6c0639039b444be8e5d638f7abbada189971eb2
LABEL org.opencontainers.image.title="Akoflow automatic OCI build demo"
RUN printf 'Akoflow built this OCI image automatically before execution.\n' > /image-build-proof.txt
CMD ["sh", "-c", "cat /image-build-proof.txt"]
Loading