Skip to content

Fix - issue code and summary #17

Fix - issue code and summary

Fix - issue code and summary #17

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
- name: Install dependencies
run: composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet
- name: Clear cache
run: |
rm -rf var/cache/*
rm -rf var/log/*
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta_t2j
uses: docker/metadata-action@v4
with:
images: |
68publishers/toggl-to-jira
tags: |
type=schedule
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/prod/Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_t2j.outputs.tags }}
labels: ${{ steps.meta_t2j.outputs.labels }}