Skip to content

Commit db02d65

Browse files
Merge pull request #114 from OneBusAway/latest
Push up a `latest` tag to Docker Hub for each OBA image version
2 parents 5f38be8 + 2975d48 commit db02d65

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/docker.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ jobs:
6767
- name: onebusaway-api-webapp
6868
context: oba
6969
steps:
70-
- name: Compute image tag name
71-
run: echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV
70+
- name: Compute image tag names
71+
run: |
72+
# Set the full version tag (e.g., 2.5.13-otsf-v5.0.0)
73+
echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV
74+
# Extract the software version (e.g., 2.5.13-otsf) and add -latest
75+
echo "LATEST_TAG=$(echo $GITHUB_REF_NAME | sed 's/-v[0-9]\+\.[0-9]\+\.[0-9]\+/-latest/')" >> $GITHUB_ENV
7276
- name: Checkout code
7377
uses: actions/checkout@v4
7478
- name: Set up QEMU
@@ -98,3 +102,4 @@ jobs:
98102
push: true
99103
tags: |
100104
opentransitsoftwarefoundation/${{ matrix.name }}:${{ env.IMAGE_TAG }}
105+
opentransitsoftwarefoundation/${{ matrix.name }}:${{ env.LATEST_TAG }}

0 commit comments

Comments
 (0)