File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ on : push
2+
3+ name : Docker image
4+ jobs :
5+ build :
6+ name : Build and push
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout code
10+ uses : actions/checkout@v2
11+ - name : Setup PHP, with composer and extensions
12+ uses : shivammathur/setup-php@v2
13+ with :
14+ php-version : 7.4
15+ extensions : dom, zip
16+ coverage : none
17+ tools : composer:v2
18+ - name : Install PHP dependencies
19+ run : |
20+ composer install --no-interaction --no-progress
21+ - name : Build theme
22+ working-directory : web/profiles/custom/os2loop/themes/os2loop_theme
23+ run : |
24+ yarn install
25+ yarn build
26+ - name : Set up Docker Buildx
27+ id : buildx
28+ uses : docker/setup-buildx-action@v1
29+ - name : Login to GitHub Container Registry
30+ uses : docker/login-action@v1
31+ # We only push from the default branch, so no need to login from elsewhere.
32+ if : ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
33+ with :
34+ registry : ghcr.io
35+ username : ${{ github.repository_owner }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+ - name : Build and push Docker image
38+ uses : docker/build-push-action@v2
39+ with :
40+ builder : ${{ steps.buildx.outputs.name }}
41+ # Only push the image if this is a push to the default branch.
42+ push : ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
43+ context : .
44+ labels : |
45+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
46+ org.opencontainers.image.version=${{ github.sha }}
47+ org.opencontainers.image.revision=${{ github.sha }}
48+ tags : |
49+ ghcr.io/${{ github.repository }}:latest
You can’t perform that action at this time.
0 commit comments