Skip to content

Commit

Permalink
ci: update docker release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Aug 7, 2024
1 parent 7759829 commit 9b2b721
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/release-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@ name: Release latest

on:
push:
branches:
- master
tags:
- "v*"

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: blossomlabs/swarm-batch-prometheus
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: blossomlabs/swarm-batch-prometheus:latest
tags: ${{ steps.meta_api.outputs.tags }}
labels: ${{ steps.meta_api.outputs.labels }}

0 comments on commit 9b2b721

Please sign in to comment.