Skip to content

Commit

Permalink
actions: try replacing tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mischavandenburg committed Apr 30, 2024
1 parent b5254a7 commit 9db7142
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/update-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: replace tag

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set foobar to cool
uses: mikefarah/yq@master
with:
cmd: |
yq eval ".spec.template.spec.containers[] | select(.name == 'httpd').image = 'ghcr.io/mytest/httpd:v0.0.1'" -i ./kubernetes/deployments/test.yaml
- name: push
uses: actions-x/commit@v6
with:
email: [email protected]
name: GitHub Actions Autocommitter
branch: main
20 changes: 20 additions & 0 deletions kubernetes/deployments/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: httpd-backend
name: httpd-backend
spec:
# replicas: 2
selector:
matchLabels:
app: httpd-backend
template:
metadata:
labels:
app: httpd-backend
tier: backend
spec:
containers:
- image: ghcr.io/mytest/httpd:v0.0.0
name: httpd

0 comments on commit 9db7142

Please sign in to comment.