Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: docker
on:
workflow_dispatch: {}
push:
branches: [main]
tags:
- v*

Expand All @@ -28,9 +29,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get short commit
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push tagged
uses: docker/build-push-action@v6
if: github.event_name != 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
with:
context: .
file: Dockerfile
Expand All @@ -39,17 +44,13 @@ jobs:
tags: |
ghcr.io/tempoxyz/rpc-tester:latest
ghcr.io/tempoxyz/rpc-tester:${{ github.ref_name }}
ghcr.io/tempoxyz/rpc-tester:${{ steps.vars.outputs.sha_short }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Get short commit
if: github.event_name == 'workflow_dispatch'
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push dispatched
- name: Build and push commit
uses: docker/build-push-action@v6
if: github.event_name == 'workflow_dispatch'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
context: .
file: Dockerfile
Expand Down