github.com/kubevela/workflow@v0.6.0/.github/workflows/post-submit.yaml (about) 1 name: PostSubmit 2 3 on: 4 push: 5 branches: 6 - main 7 workflow_dispatch: {} 8 9 env: 10 GO_VERSION: '1.19' 11 12 jobs: 13 14 detect-noop: 15 runs-on: ubuntu-20.04 16 outputs: 17 noop: ${{ steps.noop.outputs.should_skip }} 18 steps: 19 - name: Detect No-op Changes 20 id: noop 21 uses: fkirc/skip-duplicate-actions@v5.3.0 22 with: 23 github_token: ${{ secrets.GITHUB_TOKEN }} 24 paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' 25 do_not_skip: '["workflow_dispatch", "schedule", "push"]' 26 concurrent_skipping: false 27 28 image-multi-arch: 29 runs-on: ubuntu-20.04 30 needs: detect-noop 31 if: needs.detect-noop.outputs.noop != 'true' 32 strategy: 33 matrix: 34 arch: [ amd64, arm64 ] 35 36 steps: 37 - name: Checkout 38 uses: actions/checkout@v2 39 with: 40 submodules: true 41 42 - name: Setup Go 43 uses: actions/setup-go@v2 44 with: 45 go-version: ${{ env.GO_VERSION }} 46 47 - name: Build Image 48 run: | 49 IMG_TAG=latest-${{ matrix.arch }} \ 50 OS=linux \ 51 ARCH=${{ matrix.arch }} \ 52 make docker-build 53 - name: Push Image 54 run: | 55 echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin 56 docker push oamdev/vela-workflow:latest-${{ matrix.arch }} 57 docker push oamdev/vela-workflow:latest-${{ matrix.arch }} 58 image-manifest: 59 runs-on: ubuntu-latest 60 needs: [ image-multi-arch ] 61 steps: 62 63 - name: Checkout 64 uses: actions/checkout@v2 65 with: 66 submodules: true 67 68 - name: Create Manifest 69 run: | 70 echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin 71 docker manifest create oamdev/vela-workflow:latest \ 72 oamdev/vela-workflow:latest-amd64 \ 73 oamdev/vela-workflow:latest-arm64 74 - name: Annotate Manifest 75 run: | 76 docker manifest annotate oamdev/vela-workflow:latest \ 77 oamdev/vela-workflow:latest-amd64 --arch amd64 78 docker manifest annotate oamdev/vela-workflow:latest \ 79 oamdev/vela-workflow:latest-arm64 --arch arm64 80 - name: Push Manifest 81 run: | 82 docker manifest push oamdev/vela-workflow:latest