diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..70e1c62 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +name: Release Docker +on: + push: + branches: + - "main" + tags: + - "*" + release: + types: [published] +jobs: + release-docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Docker meta + uses: docker/metadata-action@v4 + id: meta + with: + images: flared/buildevents + - uses: docker/login-action@v2 + if: github.event_name != 'pull_request' + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + platforms: "linux/arm64,linux/amd64" + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a562860 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:3 + +RUN apk add --no-cache \ + curl + +RUN mkdir -p /opt/buildevents + +WORKDIR /opt/buildevents + +# Install buildevents +RUN curl -L \ + -o buildevents \ + https://github.com/honeycombio/buildevents/releases/download/v0.16.0/buildevents-linux-amd64 \ + && chmod 755 buildevents + +CMD ["/opt/buildevents/buildevents", "--help"] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..54c5d99 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# docker-buildevents