diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..cb0b9d45 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: publish + +on: + push: + tags: + - 'v1.*' + - 'gh-action-test-*' + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Log in to registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: "{{defaultContext}}" + file: ./Dockerfile + push: true + tags: ghcr.io/${{github.repository}}:${{github.ref_name}} + labels: org.opencontainers.image.source=https://github.com/${{github_repository}} diff --git a/Dockerfile b/Dockerfile index a88bfcf8..b4b2ccce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6-alpine3.7 +FROM python:3.12-alpine3.19 COPY . /python WORKDIR /python