Skip to content

Commit

Permalink
feat(workflows): separate build/push from release (#19)
Browse files Browse the repository at this point in the history
so that it can be used independently
  • Loading branch information
aimeerivers authored Mar 27, 2024
1 parent 2cb874d commit aef6847
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
name: Release and Push Docker Image
name: Build and Push Docker Image

on:
workflow_call:
inputs:
tag_name:
type: string
description: Tag name
required: false
default: latest
secrets:
READONLY_NPM_TOKEN:
description: Needed to install private @hedia npm packages
required: true
HEDIA_BOT_GITHUB_PAT:
description: Needed to push to GitHub Container Registry
required: true

permissions:
contents: write
pull-requests: write
packages: write

jobs:
release:
uses: hedia-team/.github/.github/workflows/release-please.yml@latest
secrets: inherit

build-and-push:
needs: release
build-and-push-docker-image:
runs-on: ubuntu-latest
if: needs.release.outputs.release_created == 'true'
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -44,5 +51,5 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ needs.release.outputs.tag_name }}
ghcr.io/${{ github.repository }}:${{ inputs.tag_name }}
ghcr.io/${{ github.repository }}:latest

0 comments on commit aef6847

Please sign in to comment.