|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | publish: |
10 | | - strategy: |
11 | | - matrix: |
12 | | - go-version: [ 1.17.x ] |
13 | | - os: [ ubuntu-latest ] |
14 | | - runs-on: ${{ matrix.os }} |
| 10 | + runs-on: ubuntu-latest |
15 | 11 | permissions: |
16 | 12 | contents: write |
17 | | - actions: read |
18 | 13 | checks: write |
| 14 | + |
| 15 | + actions: read |
19 | 16 | issues: read |
20 | 17 | packages: write |
21 | 18 | pull-requests: read |
22 | 19 | repository-projects: read |
23 | 20 | statuses: read |
| 21 | + |
24 | 22 | steps: |
25 | 23 | - uses: actions/checkout@master |
26 | 24 | with: |
27 | 25 | fetch-depth: 1 |
28 | 26 | - name: Install Go |
29 | | - uses: actions/setup-go@v2 |
| 27 | + uses: actions/setup-go@master |
30 | 28 | with: |
31 | | - go-version: ${{ matrix.go-version }} |
| 29 | + go-version: 1.19.x |
| 30 | + |
32 | 31 | - name: Make all |
33 | 32 | run: make all |
34 | 33 |
|
35 | 34 | - name: Get TAG |
36 | 35 | id: get_tag |
37 | | - run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} |
| 36 | + run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV |
| 37 | + |
38 | 38 | - name: Get Repo Owner |
39 | 39 | id: get_repo_owner |
40 | | - run: > |
41 | | - echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | |
42 | | - tr '[:upper:]' '[:lower:]') |
43 | | - - name: Get Repo Name |
44 | | - id: get_repo_name |
45 | | - run: > |
46 | | - echo ::set-output name=repo_name::$(echo ${{ github.repository }} | |
47 | | - tr '[:upper:]' '[:lower:]' | |
48 | | - awk -F'/' '{print $2}') |
| 40 | + run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV |
49 | 41 |
|
50 | 42 | - name: Set up QEMU |
51 | | - uses: docker/setup-qemu-action@v1 |
| 43 | + uses: docker/setup-qemu-action@v2 |
52 | 44 | - name: Set up Docker Buildx |
53 | | - uses: docker/setup-buildx-action@v1 |
| 45 | + uses: docker/setup-buildx-action@v2 |
54 | 46 |
|
55 | 47 | - name: Login to Docker Registry |
56 | | - uses: docker/login-action@v1 |
| 48 | + uses: docker/login-action@v2 |
57 | 49 | with: |
58 | 50 | username: ${{ github.repository_owner }} |
59 | 51 | password: ${{ secrets.GITHUB_TOKEN }} |
60 | 52 | registry: ghcr.io |
61 | 53 |
|
62 | 54 | - name: Build and push |
63 | 55 | id: docker_build |
64 | | - uses: docker/build-push-action@v2 |
| 56 | + uses: docker/build-push-action@v3 |
65 | 57 | with: |
66 | 58 | context: ./ |
67 | 59 | file: ./Dockerfile |
68 | 60 | push: true |
69 | 61 | platforms: linux/amd64,linux/arm64,linux/arm/v7 |
70 | 62 | tags: | |
71 | | - ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ github.sha }} |
72 | | - ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ steps.get_tag.outputs.TAG }} |
73 | | - ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ steps.get_repo_name.outputs.repo_name }}:latest |
| 63 | + ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/classic-watchdog:${{ github.sha }} |
| 64 | + ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/classic-watchdog:${{ steps.get_tag.outputs.TAG }} |
| 65 | + ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/classic-watchdog:latest |
| 66 | +
|
74 | 67 | - name: Upload release binaries |
75 | | - uses: alexellis/upload-assets@0.2.2 |
| 68 | + uses: alexellis/upload-assets@0.4.0 |
76 | 69 | env: |
77 | 70 | GITHUB_TOKEN: ${{ github.token }} |
78 | 71 | with: |
|
0 commit comments