-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.95 KB
/
build.yml
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
name: Build Docker Image
on:
push:
paths:
- .github/workflows/build.yml
- build-base.sh
- Dockerfile
- wolfi-base.yaml
schedule:
- cron: '5 3 * * *'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
base:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Login into Github Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PAT }}" | docker login -u marcusmu --password-stdin
- name: Build base and push
run: ./build-base.sh
fink:
needs: [base]
runs-on: ubuntu-latest
steps:
- name: Get latest PHP Mess Detector version
id: fink_version
run: |
VERSION=$(curl https://api.github.com/repos/dantleech/fink/releases/latest | jq '.tag_name | ltrimstr("v")' -r)
echo "FINK_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
echo "FINK_VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Login into Github Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PAT }}" | docker login -u marcusmu --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
build-args: |
PHP_FINK_VERSION=${{ steps.fink_version.outputs.FINK_VERSION }}
tags: |
marcusmu/php-fink:latest
marcusmu/php-fink:${{ steps.fink_version.outputs.FINK_VERSION }}
ghcr.io/m-arcus/php-fink:latest
ghcr.io/m-arcus/php-fink:${{ steps.fink_version.outputs.FINK_VERSION }}