forked from alonitac/NetflixFrontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
davidhei2023
committed
Jul 15, 2024
1 parent
e761928
commit 2d65b3b
Showing
2 changed files
with
50 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
#name: NetflixFrontend stack build-deploy | ||
# | ||
#on: | ||
# push: | ||
# branches: | ||
# - main | ||
# | ||
#permissions: | ||
# contents: write | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v1 | ||
# | ||
# - name: Log in to Docker Hub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKER_USERNAME }} | ||
# password: ${{ secrets.DOCKER_PASSWORD }} | ||
# | ||
# - name: Build and push Docker images | ||
# run: | | ||
# DOCKER_IMAGE_TAG=frontend-v0.0.3-${{ github.run_number }} | ||
# docker buildx build --platform linux/amd64,linux/arm64 -t davidhei/netflix:${DOCKER_IMAGE_TAG} --push . | ||
# - name: Checkout infrastructure repo | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: davidhei2023/NetflixInfra | ||
# token: ${{ secrets.REPO_TOKEN }} | ||
# path: ./NetflixInfra | ||
# | ||
# - name: Update YAML manifests | ||
# run: | | ||
# cd ./NetflixInfra/NetflixFrontend | ||
# sed -i 's|image: .*$|image: davidhei/netflix:frontend-v0.0.3-${{ github.run_number }}|' frontend.yaml | ||
# - name: Commit and Push changes | ||
# run: | | ||
# cd ./NetflixInfra | ||
# git config user.email "${{ secrets.GIT_USER_EMAIL }}" | ||
# git config user.name "${{ secrets.GIT_USER_NAME }}" | ||
# git add . | ||
# git commit -m "Update NetflixFrontend image to frontend-v0.0.3-${{ github.run_number }}" | ||
# git push | ||
name: NetflixFrontend stack build-deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker images | ||
run: | | ||
DOCKER_IMAGE_TAG=frontend-v0.0.3-${{ github.run_number }} | ||
docker buildx build --platform linux/amd64,linux/arm64 -t davidhei/netflix:${DOCKER_IMAGE_TAG} --push . | ||
- name: Checkout infrastructure repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: davidhei2023/NetflixInfra | ||
token: ${{ secrets.REPO_TOKEN }} | ||
path: ./NetflixInfra | ||
|
||
- name: Update YAML manifests | ||
run: | | ||
cd ./NetflixInfra/NetflixFrontend | ||
sed -i 's|image: .*$|image: davidhei/netflix:frontend-v0.0.3-${{ github.run_number }}|' frontend.yaml | ||
- name: Commit and Push changes | ||
run: | | ||
cd ./NetflixInfra | ||
git config user.email "${{ secrets.GIT_USER_EMAIL }}" | ||
git config user.name "${{ secrets.GIT_USER_NAME }}" | ||
git add . | ||
git commit -m "Update NetflixFrontend image to frontend-v0.0.3-${{ github.run_number }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ pipeline { | |
label 'general' | ||
} | ||
|
||
|
||
|
||
triggers { | ||
githubPush() | ||
} | ||
|