mirror of
https://github.com/ditkrg/build-image-workflow.git
synced 2026-01-22 21:27:05 +00:00
Merge pull request #12 from ditkrg/add-major-tag-update
Update readme.md
This commit is contained in:
commit
76881e94db
56
README.md
56
README.md
@ -101,4 +101,58 @@ jobs:
|
|||||||
file: "path/to/Dockerfile"
|
file: "path/to/Dockerfile"
|
||||||
```
|
```
|
||||||
|
|
||||||
Feel free to customize the inputs and adjust the workflow based on your specific requirements.
|
If you want to use it with our GitOps Action:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- v[0-9]+.[0-9]+.[0-9]+
|
||||||
|
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- ".vscode/**"
|
||||||
|
|
||||||
|
- ".github/**"
|
||||||
|
- "!.github/workflows/tests-base.yaml"
|
||||||
|
- "!.github/workflows/deploy.yaml"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.build-image.outputs.tag }}
|
||||||
|
tags: ${{ steps.build-image.outputs.tags }}
|
||||||
|
steps:
|
||||||
|
- id: build-image
|
||||||
|
name: Build and Push Image
|
||||||
|
uses: ditkrg/build-image-workflow@v1
|
||||||
|
with:
|
||||||
|
image: "my-docker-image"
|
||||||
|
registry: "my-registry.example.com"
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
build-args: "EXAMPLE=123"
|
||||||
|
build-secrets: "EXAMPLE=****"
|
||||||
|
file: "path/to/Dockerfile"
|
||||||
|
|
||||||
|
update-gitops:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency: pr-${{ github.ref_name }}
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Update gitops
|
||||||
|
uses: ditkrg/update-gitops-image@v1
|
||||||
|
with:
|
||||||
|
owner: ditkrg
|
||||||
|
repo: GITOPS_REPO
|
||||||
|
app-id: ${{ secrets.APP_ID }}
|
||||||
|
image-tag: ${{ needs.build.outputs.tag }}
|
||||||
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
component-name: REPO_NAME
|
||||||
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user