ci: Changed sha tag name, using docker tag in deployment
This commit is contained in:
parent
81006d192b
commit
a36a9ed8f6
2 changed files with 23 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=sha,prefix=
|
||||
type=ref,event=tag
|
||||
-
|
||||
name: Login to registry
|
||||
|
|
|
|||
|
|
@ -15,9 +15,29 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Repository meta
|
||||
id: repository
|
||||
run: |
|
||||
registry=${{ github.server_url }}
|
||||
registry=${registry##http*://}
|
||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||
echo "registry=${registry}"
|
||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||
echo "repository=${repository}"
|
||||
|
||||
- name: Docker meta
|
||||
uses: docker/metadata-action@v5
|
||||
id: docker
|
||||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
tags: |
|
||||
type=sha,prefix=
|
||||
|
||||
- name: Replace Image Version
|
||||
runs: |
|
||||
sed -i "s/###IMAGETAG###/${{ github.sha }}/g" ./EdgeConnectConfig.yaml
|
||||
run: |
|
||||
echo sed -i "s/###IMAGETAG###/${{ steps.docker.outputs.tags }}/g" ./EdgeConnectConfig.yaml
|
||||
sed -i "s/###IMAGETAG###/${{ steps.docker.outputs.tags }}/g" ./EdgeConnectConfig.yaml
|
||||
cat ./EdgeConnectConfig.yaml
|
||||
|
||||
- name: Deploy action
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue