diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 000000000000..7b88cb78eaaf --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,50 @@ +name: Create and publish a Docker image + +on: +# push: +# branches: +# - master + release: + types: [published] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=tag + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + diff --git a/Dockerfile b/Dockerfile index 32f21e3eb392..26a46c240417 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ WORKDIR /usr/local/searxng COPY requirements.txt ./requirements.txt # for download packages in iran we must use proxy -ENV HTTPS_PROXY="http://fodev.org:8118" +# ENV HTTPS_PROXY="http://fodev.org:8118" RUN apk add --no-cache -t build-dependencies \ build-base \ py3-setuptools \