Skip to content

Commit

Permalink
Handle update of fog-ros-baseimage update
Browse files Browse the repository at this point in the history
  • Loading branch information
maseabunikie committed Apr 29, 2022
1 parent 2731c41 commit f0470bb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/tii-mocap-pose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: tii-mocap-pose

on:
repository_dispatch:
types: [fog-ros-baseimage-update]
push:

jobs:
Expand All @@ -13,6 +15,18 @@ jobs:

- uses: docker/setup-buildx-action@v1

- name: Set image tag format without suffix
run: |
echo "IMAGE_TAG_FORMAT=type=sha" >> $GITHUB_ENV
if: github.event_name == 'push'

- name: Set image tag format with suffix
# it is possible that run_number should be used instead run_attempt
# run_attempt is unique number on every run and run_attempt resets to 1 if re-build is not used
run: |
echo "IMAGE_TAG_FORMAT=type=sha,suffix=-${{ github.event.client_payload.run_attempt }}" >> $GITHUB_ENV
if: github.event_name == 'repository_dispatch'

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
Expand All @@ -21,8 +35,8 @@ jobs:
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
type=raw,value=latest
${{ env.IMAGE_TAG_FORMAT }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
Expand Down

0 comments on commit f0470bb

Please sign in to comment.