Skip to content

Commit

Permalink
Authorize before buiding
Browse files Browse the repository at this point in the history
  • Loading branch information
huyennguyen-katalon committed Oct 2, 2024
1 parent b2bf39a commit b15d538
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/workflow-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
with:
version: latest
endpoint: builders
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::002582244933:role/katalon-github-oidc-federation
role-session-name: github-actions
aws-region: us-east-1
mask-aws-account-id: "no"
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v2
# with:
# role-to-assume: arn:aws:iam::002582244933:role/katalon-github-oidc-federation
# role-session-name: github-actions
# aws-region: us-east-1
# mask-aws-account-id: "no"
# - name: Login to Amazon ECR
# uses: aws-actions/amazon-ecr-login@v1
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -47,9 +47,9 @@ jobs:
chmod u+x ./build/*.sh
./build/clean.sh $KRE_VERSION
./build/build.sh $KRE_VERSION
- name: Tag Docker image with commit ID
run: |
docker images
docker tag katalon-katalon 002582244933.dkr.ecr.us-east-1.amazonaws.com/katalon-studio:$DOCKER_IMAGE_PUBLISHED_TAG
# - name: Tag Docker image with commit ID
# run: |
# docker images
# docker tag katalon-katalon 002582244933.dkr.ecr.us-east-1.amazonaws.com/katalon-studio:$DOCKER_IMAGE_PUBLISHED_TAG
# - name: Push Docker image to ECR
# run: docker push 002582244933.dkr.ecr.us-east-1.amazonaws.com/katalon-studio:$DOCKER_IMAGE_PUBLISHED_TAG
5 changes: 5 additions & 0 deletions .github/workflows/workflow-non-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt -y install jq
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare
run: |
chmod u+x ./build/*.sh
Expand Down
3 changes: 2 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export DOCKER_BUILDKIT=1

# docker buildx create --name mybuilder --driver docker-container --use --bootstrap
docker buildx ls
docker buildx build --platform linux/amd64,linux/arm64 --load -t katalon-katalon -f src/Dockerfile --build-arg KATALON_STUDIO_VERSION=$ksversion .
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64 --push -t katalon-katalon -f src/Dockerfile --build-arg KATALON_STUDIO_VERSION=$ksversion .

0 comments on commit b15d538

Please sign in to comment.