|
1 | 1 | name: ci |
2 | | - |
3 | 2 | on: |
4 | 3 | push: |
5 | 4 | branches: |
|
10 | 9 | - "beta" |
11 | 10 | tags: |
12 | 11 | - "*" |
13 | | - |
14 | 12 | jobs: |
15 | 13 | docker: |
16 | 14 | runs-on: ubuntu-latest |
17 | 15 | steps: |
18 | 16 | - |
19 | | - name: Checkout |
20 | | - uses: actions/checkout@v2 |
| 17 | + name: 📥 Checkout |
| 18 | + uses: actions/checkout@v4 |
21 | 19 | - |
22 | | - name: Set up QEMU |
23 | | - uses: docker/setup-qemu-action@v1 |
| 20 | + name: 🖥️ Set up QEMU |
| 21 | + uses: docker/setup-qemu-action@v3 |
24 | 22 | - |
25 | | - name: Docker meta tag |
26 | | - id: docker_meta |
27 | | - uses: docker/metadata-action@v3.5.0 |
| 23 | + name: 🏷️ Docker meta tag |
| 24 | + id: meta |
| 25 | + uses: docker/metadata-action@v5 |
28 | 26 | with: |
29 | | - images: guysoft/custompios |
30 | | - tag-sha: true |
| 27 | + images: | |
| 28 | + ghcr.io/${{ github.repository_owner }}/custompios |
| 29 | + tags: | |
| 30 | + type=ref,event=branch |
| 31 | + type=ref,event=tag |
| 32 | + type=sha |
31 | 33 | - |
32 | | - name: Set up Docker Buildx |
33 | | - uses: docker/setup-buildx-action@v1 |
| 34 | + name: 🛠️ Set up Docker Buildx |
| 35 | + uses: docker/setup-buildx-action@v3 |
34 | 36 | - |
35 | | - name: Login to DockerHub |
36 | | - uses: docker/login-action@v1 |
| 37 | + name: 🔑 Login to GitHub Container Registry |
| 38 | + uses: docker/login-action@v3 |
37 | 39 | with: |
38 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
39 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 40 | + registry: ghcr.io |
| 41 | + username: ${{ github.repository_owner }} |
| 42 | + password: ${{ secrets.GITHUB_TOKEN }} |
40 | 43 | - |
41 | | - name: Build and push |
| 44 | + name: 🏗️ Build and push |
42 | 45 | id: docker_build |
43 | | - uses: docker/build-push-action@v2 |
| 46 | + uses: docker/build-push-action@v5 |
44 | 47 | with: |
45 | 48 | context: src |
46 | 49 | file: src/Dockerfile |
47 | 50 | platforms: linux/amd64,linux/arm64,linux/arm/v7 |
48 | 51 | push: true |
49 | | - tags: ${{ steps.docker_meta.outputs.tags }} |
50 | | - labels: ${{ steps.docker_meta.outputs.labels }} |
| 52 | + tags: ${{ steps.meta.outputs.tags }} |
| 53 | + labels: ${{ steps.meta.outputs.labels }} |
51 | 54 | secrets: | |
52 | | - GIT_AUTH_TOKEN=${{ secrets.MY_GITHUB_TOKEN }} |
| 55 | + github_token=${{ secrets.GITHUB_TOKEN }} |
0 commit comments