Update ubuntu Docker tag to v24 #518
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push containers | |
on: | |
release: | |
types: [published] | |
pull_request: | |
jobs: | |
release-container: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_USER: ${{ secrets.CONTAINER_USERNAME }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Login to GitHub Container Registry | |
if: ${{ github.event_name == 'release' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/laminas/laminas-continuous-integration | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=ref,event=branch | |
type=ref,event=pr | |
flavor: | | |
latest=false | |
- name: Build image. Push for release | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
pull: true | |
push: ${{ github.event_name == 'release' }} | |
tags: | | |
${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |