Davide Pesavento | 183e188 | 2024-04-09 15:56:32 -0400 | [diff] [blame] | 1 | name: Docker |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 2 | on: |
| 3 | push: |
| 4 | branches: |
| 5 | - master |
| 6 | paths-ignore: |
Davide Pesavento | 183e188 | 2024-04-09 15:56:32 -0400 | [diff] [blame] | 7 | - '.editorconfig' |
Davide Pesavento | caa60cc | 2024-02-18 18:18:37 -0500 | [diff] [blame] | 8 | - '.jenkins' |
| 9 | - '.jenkins.d/**' |
Davide Pesavento | 183e188 | 2024-04-09 15:56:32 -0400 | [diff] [blame] | 10 | - 'launchd/**' |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 11 | - '.mailmap' |
Davide Pesavento | 183e188 | 2024-04-09 15:56:32 -0400 | [diff] [blame] | 12 | - 'systemd/**' |
Davide Pesavento | caa60cc | 2024-02-18 18:18:37 -0500 | [diff] [blame] | 13 | - 'tests/**' |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 14 | workflow_dispatch: |
| 15 | |
| 16 | permissions: |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 17 | packages: write |
| 18 | |
| 19 | env: |
| 20 | REGISTRY: ghcr.io |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 21 | |
| 22 | jobs: |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 23 | nfd: |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 24 | runs-on: ubuntu-latest |
| 25 | steps: |
| 26 | - name: Checkout repository |
| 27 | uses: actions/checkout@v4 |
| 28 | with: |
| 29 | submodules: true |
| 30 | |
| 31 | - name: Login to ${{ env.REGISTRY }} |
| 32 | uses: docker/login-action@v3 |
| 33 | with: |
| 34 | registry: ${{ env.REGISTRY }} |
| 35 | username: ${{ github.actor }} |
| 36 | password: ${{ secrets.GITHUB_TOKEN }} |
| 37 | |
| 38 | - name: Extract metadata |
| 39 | id: meta |
| 40 | uses: docker/metadata-action@v5 |
| 41 | with: |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 42 | images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/nfd |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 43 | flavor: latest=true |
| 44 | |
| 45 | - name: Build and push Docker image |
| 46 | uses: docker/build-push-action@v5 |
| 47 | with: |
| 48 | context: . |
Davide Pesavento | 01d0aa6 | 2024-04-12 00:30:05 -0400 | [diff] [blame^] | 49 | target: nfd |
Varun Patil | 6ba08cd | 2023-11-18 13:54:52 -0800 | [diff] [blame] | 50 | pull: true |
| 51 | push: true |
| 52 | tags: ${{ steps.meta.outputs.tags }} |
| 53 | labels: ${{ steps.meta.outputs.labels }} |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 54 | |
| 55 | nfd-status-http-server: |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 56 | runs-on: ubuntu-latest |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 57 | steps: |
| 58 | - name: Checkout repository |
| 59 | uses: actions/checkout@v4 |
Davide Pesavento | 01d0aa6 | 2024-04-12 00:30:05 -0400 | [diff] [blame^] | 60 | with: |
| 61 | submodules: true |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 62 | |
| 63 | - name: Login to ${{ env.REGISTRY }} |
| 64 | uses: docker/login-action@v3 |
| 65 | with: |
| 66 | registry: ${{ env.REGISTRY }} |
| 67 | username: ${{ github.actor }} |
| 68 | password: ${{ secrets.GITHUB_TOKEN }} |
| 69 | |
| 70 | - name: Extract metadata |
| 71 | id: meta |
| 72 | uses: docker/metadata-action@v5 |
| 73 | with: |
| 74 | images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/nfd-status-http-server |
| 75 | flavor: latest=true |
| 76 | |
| 77 | - name: Build and push Docker image |
| 78 | uses: docker/build-push-action@v5 |
| 79 | with: |
Davide Pesavento | 01d0aa6 | 2024-04-12 00:30:05 -0400 | [diff] [blame^] | 80 | context: . |
| 81 | target: nfd-status-http-server |
Varun Patil | 23135a4 | 2023-11-18 15:12:42 -0800 | [diff] [blame] | 82 | pull: true |
| 83 | push: true |
| 84 | tags: ${{ steps.meta.outputs.tags }} |
| 85 | labels: ${{ steps.meta.outputs.labels }} |