Skip to content

Commit

Permalink
[ci] Adding meaningfull tags on Speculos Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger committed Mar 19, 2024
1 parent 2c6cdf8 commit 56b0de0
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,38 @@ jobs:
deploy_docker:
name: Build and Upload the Speculos docker
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
needs: [build]
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and publish to GitHub Packages
uses: docker/build-push-action@v1

- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ledgerhq/speculos
tags: |
type=raw,value=${{ github.sha }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to registry
uses: docker/login-action@v2
with:
repository: ledgerhq/speculos
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
tag_with_sha: true
tags: latest

- name: Build and publish to GitHub Packages
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 56b0de0

Please sign in to comment.