Skip to content

Commit

Permalink
ci: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed Feb 26, 2021
1 parent abfe078 commit cdded1c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
images:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'aulasoftwarelibre/idea' && github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.repository == 'aulasoftwarelibre/idea' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/releases/') || startsWith(github.ref, 'refs/tags/v') )
steps:
-
name: Checkout
Expand All @@ -33,6 +33,12 @@ jobs:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

-
name: Extract tag name
id: extract_tag
run: echo "::set-output name=tag::$(echo ${GITHUB_REF##*/})"

-
name: Build and push php
uses: docker/build-push-action@v2
Expand All @@ -43,8 +49,9 @@ jobs:
target: idea_php
tags: |
ghcr.io/aulasoftwarelibre/idea-php:latest
ghcr.io/aulasoftwarelibre/idea-php:${{ steps.extract_tag.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
-
name: Build and push httpd
uses: docker/build-push-action@v2
Expand All @@ -55,5 +62,6 @@ jobs:
target: idea_httpd
tags: |
ghcr.io/aulasoftwarelibre/idea-httpd:latest
ghcr.io/aulasoftwarelibre/idea-httpd:${{ steps.extract_tag.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max

0 comments on commit cdded1c

Please sign in to comment.