Skip to content

Commit

Permalink
Merge branch 'develop' into feature/d-10-prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk authored Nov 20, 2023
2 parents d2b50d0 + 065762c commit eee908f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on: push

name: Docker image
jobs:
build:
name: Build and push
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: dom, zip
coverage: none
tools: composer:v2
- name: Install PHP dependencies
run: |
composer install --no-interaction --no-progress
- name: Build theme
working-directory: web/profiles/custom/os2loop/themes/os2loop_theme
run: |
yarn install
yarn build
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
# We only push from the default branch, so no need to login from elsewhere.
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
# Only push the image if this is a push to the default branch.
push: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
context: .
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.version=${{ github.sha }}
org.opencontainers.image.revision=${{ github.sha }}
tags: |
ghcr.io/${{ github.repository }}:latest

0 comments on commit eee908f

Please sign in to comment.