Skip to content

Commit

Permalink
fix: latest images built on branch push
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 committed Jan 27, 2025
1 parent af48fe1 commit abf7eb2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,27 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags)
- name: Extract metadata (tags) - release
if: github.event_name == 'release'
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/projektadler/adler-moodle
tags: |
type=raw,value=moodle-${{ matrix.moodle_version }}
type=raw,value=latest-moodle-${{ matrix.moodle_version }}
type=raw,value=${{ github.ref_name }}-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{version}}-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{major}}.{{minor}}-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{major}}-moodle-${{ matrix.moodle_version }}
- name: Extract metadata (tags) - branch
if: github.event_name == 'push'
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/projektadler/adler-moodle
tags: |
type=raw,value=${{ github.ref_name }}-moodle-${{ matrix.moodle_version }}
- name: Build Docker image
uses: docker/build-push-action@v6
Expand Down

0 comments on commit abf7eb2

Please sign in to comment.