Skip to content

Commit

Permalink
Trying a change to the actions to update the manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Marques <me@tylermarques.com>
  • Loading branch information
Tylermarques committed Jun 12, 2024
1 parent 81b560d commit fd5ec93
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/build-and-push-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ jobs:
context: .
push: true
tags: ghcr.io/tylermarques/u-the-bomb-com:dev

- name: Post build info
run: echo "Docker image has been built and pushed to Docker Hub."
update-manifests:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: tylermarques/homelab-infra
ref: main
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update Manifests
run: |
apt update && apt install -y yq
cd homelab-infra
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
yq e '(.images[] | select(.name == "u-the-bomb-com") | .newTag) = "'${{ github.sha }}'"' apps/u-the-bomb-com/dev/kustomization.yaml -i
git commit -am 'Increment image tag'
git commit -m "Update manifests"
git push
23 changes: 21 additions & 2 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,24 @@ jobs:
push: true
tags: ghcr.io/tylermarques/u-the-bomb-com:prod

- name: Post build info
run: echo "Docker image has been built and pushed to Docker Hub."
update-manifests:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: tylermarques/homelab-infra
ref: main
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update Manifests
run: |
apt update && apt install -y yq
cd homelab-infra
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
yq e '(.images[] | select(.name == "u-the-bomb-com") | .newTag) = "'${{ github.sha }}'"' apps/u-the-bomb-com/prod/kustomization.yaml -i
git commit -am 'Increment image tag'
git commit -m "Update manifests"
git push

0 comments on commit fd5ec93

Please sign in to comment.