feat: use generic docker build action #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bedrock-connect Build image | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/run-bedrock-connect_docker-build.yaml" | ||
- "unraid-homelab/tools/minecraft/bedrock-connect/*" | ||
env: | ||
ORG_ACCOUNT: "zaggash" | ||
IMAGE_NAME: "bedrock-connect" | ||
CONTEXT: "./unraid-homelab/tools/minecraft/bedrock-connect/" | ||
DOCKERFILE: "./unraid-homelab/tools/minecraft/bedrock-connect/Dockerfile" | ||
jobs: | ||
extract-tag: | ||
name: Extract Application Tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | ||
- name: Get Bedrock-connect version | ||
run: | | ||
TAG=$(grep -Po 'CONNECT=\K.*' ${{ env.DOCKERFILE }} ) | ||
echo "TAG_ENV=$TAG" >> $GITHUB_ENV | ||
outputs: | ||
org-account: ${{ env.ORG_ACCOUNT }} | ||
image-name: ${{ env.IMAGE_NAME }} | ||
tag: ${{ env.TAG_ENV }} | ||
context: ${{ env.CONTEXT }} | ||
dockerfile: ${{ env.DOCKERFILE}} | ||
build-push: | ||
name: Build & Push | ||
needs: extract-tag | ||
uses: zaggash/gh-workflows/.github/workflows/action_docker-build-repo.yaml@main | ||
Check failure on line 41 in .github/workflows/run-bedrock-connect_docker-build.yaml GitHub Actions / Bedrock-connect Build imageInvalid workflow file
Check failure on line 41 in .github/workflows/run-bedrock-connect_docker-build.yaml GitHub Actions / Bedrock-connect Build imageInvalid workflow file
|
||
with: | ||
github-account: ${{ needs.extract-tag.outputs.org-account }} | ||
image-name: ${{ needs.extract-tag.outputs.image-name }} | ||
tag: ${{ needs.extract-tag.outputs.tag }} | ||
context: ${{ needs.extract-tag.outputs.context }} | ||
dockerfile: ${{ needs.extract-tag.outputs.dockerfile }} | ||
secrets: | ||
gh_username: ${{ secrets.GH_USERNAME }} | ||
gh_token: ${{ secrets.GH_TOKEN }} |