Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
darioalessandro committed Jul 10, 2024
1 parent edd1f47 commit 2fabd74
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/upload-api-docker-hub.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Publish API to Docker image

on:
pull_request:
push:
branches:
- main
paths:
- 'actix-api/**'
- 'types/**'
- 'yew-ui/**'
- 'docker/**'

- Dockerfile.actix

jobs:
push_to_registry:
name: Push API Docker image to Docker Hub
Expand All @@ -27,14 +28,10 @@ jobs:
id: extract_sha
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA::8})"

- name: Extract branch name
id: extract_branch
run: echo "::set-output name=branch::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"

- name: Build and push API Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.actix
push: true
tags: securityunion/rustlemania-api:${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_sha.outputs.sha8 }}
tags: securityunion/rustlemania-api:${{ github.ref_name }}-${{ steps.extract_sha.outputs.sha8 }}

0 comments on commit 2fabd74

Please sign in to comment.