File: publish.yml

package info (click to toggle)
python-certbot-dns-netcup 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 124 kB
  • sloc: python: 198; makefile: 3
file content (95 lines) | stat: -rw-r--r-- 3,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build and publish
on:
  push:
  pull_request:

jobs:
  build:
    name: Build and check package
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with: {python-version: 3.x}

      - run: pip install wheel twine flake8 setuptools
      - run: flake8
      - run: python setup.py sdist bdist_wheel
      - run: twine check dist/*

      - uses: actions/upload-artifact@v4
        with: {name: dist, path: dist/}

  pypi:
    name: Upload to pypi.org
    needs: build
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags')
    permissions:
      id-token: write
    steps:
      - uses: actions/download-artifact@v5
        with: {name: dist, path: dist/}
      - uses: pypa/gh-action-pypi-publish@release/v1

  docker:
    name: Upload to hub.docker.com
    runs-on: ubuntu-latest
    steps:
      - uses: docker/setup-qemu-action@v3
      - uses: docker/setup-buildx-action@v3
      - uses: docker/login-action@v3
        if: github.event_name != 'pull_request'
        with:
          username: coldfix
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - uses: docker/build-push-action@v6
        with:
          platforms: linux/amd64
          build-args: FROM=certbot/certbot:latest
          load: true
          tags: |
            coldfix/certbot-dns-netcup:amd64-latest
            coldfix/certbot-dns-netcup:amd64-${{ github.ref_name }}
      - uses: docker/build-push-action@v6
        with:
          platforms: linux/arm64
          build-args: FROM=certbot/certbot:arm64v8-latest
          load: true
          tags: |
            coldfix/certbot-dns-netcup:arm64-latest
            coldfix/certbot-dns-netcup:arm64-${{ github.ref_name }}

      # push multi-arch images:
      - run: docker push -a coldfix/certbot-dns-netcup
        if: startsWith(github.ref, 'refs/tags/v')
      - run: docker manifest create
                coldfix/certbot-dns-netcup:latest
                coldfix/certbot-dns-netcup:amd64-latest
                coldfix/certbot-dns-netcup:arm64-latest
        if: startsWith(github.ref, 'refs/tags/v')
      - run: docker manifest push coldfix/certbot-dns-netcup:latest
        if: startsWith(github.ref, 'refs/tags/v')
      - run: docker manifest create
                coldfix/certbot-dns-netcup:${{ github.ref_name }}
                coldfix/certbot-dns-netcup:amd64-${{ github.ref_name }}
                coldfix/certbot-dns-netcup:arm64-${{ github.ref_name }}
        if: startsWith(github.ref, 'refs/tags/v')
      - run: docker manifest push coldfix/certbot-dns-netcup:${{ github.ref_name }}
        if: startsWith(github.ref, 'refs/tags/v')

  snap:
    name: Upload to snapcraft.io
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: snapcore/action-build@v1
        id: build
      - uses: snapcore/action-publish@v1
        if: startsWith(github.ref, 'refs/tags/v')
        env:
          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
        with:
          snap: ${{ steps.build.outputs.snap }}
          release: stable