File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
2+ # This action is triggered by the repository_dispatch event
3+ # published by the imgproxy/imgproxy repository.
4+ # It updates the Docker image tag in the imgproxy Helm chart and creates a pull request.
5+ #
6+ name : Create an issue about updated imgproxy docs
7+ on :
8+ repository_dispatch :
9+ types :
10+ - imgproxy-version-updated
11+
12+ jobs :
13+ create-issue :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : write
17+ pull-requests : write
18+ steps :
19+ - name : Checkout the repository
20+ uses : actions/checkout@v4
21+
22+ - name : Update the Docker tag
23+ run : |
24+ #!/bin/bash
25+
26+ set -e
27+
28+ git config user.name "github-actions[bot]"
29+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
30+
31+ git switch -c update-docker-tag/${{ github.event.client_payload.tag }}
32+
33+ sed -i -E '0,/^([[:blank:]]+tag:[[:blank:]]*)[^[:blank:]]+/{s//\1${{ github.event.client_payload.tag }}/}' imgproxy/values.yaml
34+ git commit -am "Update image.tag to ${{ github.event.client_payload.tag }}"
35+
36+ git push --set-upstream origin update-docker-tag/${{ github.event.client_payload.tag }}
37+
38+ - name : Create a pull request
39+ env :
40+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ run : |
42+ gh pr create \
43+ --base master \
44+ --head update-docker-tag/${{ github.event.client_payload.tag }} \
45+ --title "Update image.tag to ${{ github.event.client_payload.tag }}" \
46+ --body "This pull request updates the image tag to ${{ github.event.client_payload.tag }}." \
47+ --assignee "dragonsmith"
You can’t perform that action at this time.
0 commit comments