Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Jun 3, 2024
1 parent 1139f7a commit 390de1c
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release

on:
push:
branches:
- main
tags:
- v*

Expand All @@ -16,26 +18,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4


# https://github.com/docker/metadata-action
# Tags:
# type=semver,pattern=...: on tag pushed, with a valid `semver`, the new image
# will have tags `x`, `x.y`, `x.y.z`. Pre-release GIT tag will tag image
# with only pre-release tag, e.g. `x.y.z-beta.67`, and not the others
# Flavor:
# `latest` will tag the image with `latest`

- name: Extract GIT metadata for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/invenio-rdm-starter
tags: |
# type=semver,pattern={{major}}
# type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
# type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
flavor: |
latest=true
Expand All @@ -44,14 +37,14 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Image to GitHub Container Registry
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand Down

0 comments on commit 390de1c

Please sign in to comment.