From 6df020eb21184de48441ebd557e9f260c0d65ec4 Mon Sep 17 00:00:00 2001 From: slaveeks Date: Thu, 21 Apr 2022 17:24:02 +0300 Subject: [PATCH] Some changes in gihub actions and Dockerfile --- .github/workflows/push.yml | 13 +++++++++++-- Dockerfile | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 624c0cc..5034a7f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -6,6 +6,8 @@ on: env: DOCKER_REPO: codex-team/opencollective-webhook + IMAGE_NAME: ${{ github.repository }} + REGISTRY: ghcr.io jobs: lint: @@ -27,13 +29,20 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: - registry: ghcr.io + registry: env.REGISTRY username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push production image uses: docker/build-push-action@v2 with: context: . push: ${{ endsWith(github.ref, 'refs/tags/v') }} - tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 46bd34e..4654858 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,4 @@ WORKDIR / COPY --from=build /opencollective-webhook /opencollective-webhook -COPY .env ./ - ENTRYPOINT ["/opencollective-webhook"] \ No newline at end of file