Skip to content

Commit

Permalink
add manifest and comment on image tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
benlee0423 committed Nov 3, 2024
1 parent 2198149 commit afaea49
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/action_templates/build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ runs:
shell: bash
run: |
echo "TAG_NAME=latest" >> "$GITHUB_ENV"
if: startsWith(github.ref, 'refs/heads/main')
- name: Set env vars for other branch
shell: bash
run: |
echo "TAG_NAME=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
if: ${{ !startsWith(github.ref, 'refs/heads/main') }}
# if: startsWith(github.ref, 'refs/heads/main')
#- name: Set env vars for other branch
# shell: bash
# run: |
# echo "TAG_NAME=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
# if: ${{ !startsWith(github.ref, 'refs/heads/main') }}

- name: Attach platform to tag
shell: bash
run: |
echo "TAG_NAME=${{env.TAG_NAME}}-${{inputs.platform}}" >> "$GITHUB_ENV"
if: "${{ inputs.platform != 'ARM64' }}"
#if: "${{ inputs.platform != 'ARM64' }}"

- name: Login to Docker Hub
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/action_templates/build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:
shell: bash
run: |
echo "TAG_NAME=${{env.TAG_NAME}}-${{inputs.platform}}" >> "$GITHUB_ENV"
if: "${{ inputs.platform != 'ARM64' }}"
#if: "${{ inputs.platform != 'ARM64' }}"
- name: Create Cache and Builder for Buildx
shell: bash
run: |
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/docker_image_main_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ${{ matrix.runner}}
strategy:
matrix:
runner: [ARM64, x86]
runner: [arm64, x86]
steps:
- name: deploy
uses: actions/checkout@v2
Expand Down Expand Up @@ -81,6 +81,22 @@ jobs:
- id: step1
run: echo "result=success" >> "$GITHUB_OUTPUT"

create-manifest:
needs: check_result
runs-on: ARM64
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: awiciroh
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
- name: Create and push manifest
run: |
docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/ciroh-ngen-image:latest \
awiciroh/ciroh-ngen-image:latest-arm64 \
awiciroh/ciroh-ngen-image:latest-x86
docker manifest push awiciroh/ciroh-ngen-image:latest
slack:
runs-on: ARM64
if: startsWith(github.event.pull_request.head.repo.full_name, 'CIROH-UA') ||
Expand Down

0 comments on commit afaea49

Please sign in to comment.