Skip to content

Commit

Permalink
Push up a latest tag to Docker Hub for each OBA image version
Browse files Browse the repository at this point in the history
E.g. you can use `2.5.13-otsf-latest` instead of having to hardcode the specific Docker image version.
  • Loading branch information
aaronbrethorst committed Jan 25, 2025
1 parent 5f38be8 commit 2975d48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ jobs:
- name: onebusaway-api-webapp
context: oba
steps:
- name: Compute image tag name
run: echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV
- name: Compute image tag names
run: |
# Set the full version tag (e.g., 2.5.13-otsf-v5.0.0)
echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV
# Extract the software version (e.g., 2.5.13-otsf) and add -latest
echo "LATEST_TAG=$(echo $GITHUB_REF_NAME | sed 's/-v[0-9]\+\.[0-9]\+\.[0-9]\+/-latest/')" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
Expand Down Expand Up @@ -98,3 +102,4 @@ jobs:
push: true
tags: |
opentransitsoftwarefoundation/${{ matrix.name }}:${{ env.IMAGE_TAG }}
opentransitsoftwarefoundation/${{ matrix.name }}:${{ env.LATEST_TAG }}

0 comments on commit 2975d48

Please sign in to comment.