-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reenable build, rename github PAT secret
- Loading branch information
Showing
1 changed file
with
60 additions
and
60 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 |
---|---|---|
|
@@ -8,68 +8,68 @@ on: | |
- "[0-9]*.[0-9]*.[0-9]*" | ||
|
||
jobs: | ||
# build-tag-push: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# path: | ||
# - 06-demo-application/api-golang | ||
# - 06-demo-application/api-node | ||
# - 06-demo-application/client-react | ||
# - 06-demo-application/load-generator-python | ||
# - 06-demo-application/postgresql | ||
|
||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# # Necessary to get all tags for IMAGE_TAG generation with git describe | ||
# fetch-depth: 0 | ||
|
||
# - name: Install Task | ||
# uses: arduino/setup-task@v2 | ||
# with: | ||
# version: 3.x | ||
|
||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
|
||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
|
||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# - name: Generate Image Tag | ||
# id: generate-image-tag | ||
# working-directory: 14-cicd/github-actions | ||
# run: | | ||
# image_tag=$(task generate-version-tag) | ||
# echo "image_tag=$image_tag" >> $GITHUB_OUTPUT | ||
|
||
# - uses: actions/setup-go@v4 | ||
# if: matrix.path == '06-demo-application/api-golang' | ||
# with: | ||
# go-version: "1.22.x" | ||
|
||
# - uses: ko-build/[email protected] | ||
# if: matrix.path == '06-demo-application/api-golang' | ||
# with: | ||
# version: v0.15.4 | ||
|
||
# - name: Build Image | ||
# env: | ||
# IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }} | ||
# working-directory: ${{ matrix.path }} | ||
# run: | | ||
# task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG} | ||
build-tag-push: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
path: | ||
- 06-demo-application/api-golang | ||
- 06-demo-application/api-node | ||
- 06-demo-application/client-react | ||
- 06-demo-application/load-generator-python | ||
- 06-demo-application/postgresql | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Necessary to get all tags for IMAGE_TAG generation with git describe | ||
fetch-depth: 0 | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Generate Image Tag | ||
id: generate-image-tag | ||
working-directory: 14-cicd/github-actions | ||
run: | | ||
image_tag=$(task generate-version-tag) | ||
echo "image_tag=$image_tag" >> $GITHUB_OUTPUT | ||
- uses: actions/setup-go@v4 | ||
if: matrix.path == '06-demo-application/api-golang' | ||
with: | ||
go-version: "1.22.x" | ||
|
||
- uses: ko-build/[email protected] | ||
if: matrix.path == '06-demo-application/api-golang' | ||
with: | ||
version: v0.15.4 | ||
|
||
- name: Build Image | ||
env: | ||
IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }} | ||
working-directory: ${{ matrix.path }} | ||
run: | | ||
task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG} | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
# needs: build-tag-push | ||
needs: build-tag-push | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -108,4 +108,4 @@ jobs: | |
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.DEVOPS_DIRECTIVE_KUBERNETES_COURSE_GITHUB_ACTION }} | ||
token: ${{ secrets.DEVOPS_DIRECTIVE_KUBERNETES_COURSE_GITHUB_ACTION_PAT }} |