feat(ci): push images on each push to main
@@ -269,3 +269,36 @@ jobs:
make kind-up
./demo/run-osm-demo.sh
go run ./ci/cmd/maestro.go
+
+ images:
+ name: Docker Images
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'push' }}
+ env:
+ DOCKER_USER: ${{ secrets.RELEASE_DOCKER_USER }}
+ DOCKER_PASS: ${{ secrets.RELEASE_DOCKER_PASS }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Restore Module Cache
+ uses: actions/cache@v2
+ with:
+ path: ~/go/pkg/mod
+ key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-gomod2-
+ - name: Restore Build Cache
+ uses: actions/cache@v2
+ with:
+ path: ~/.cache/go-build
+ key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
+ - name: Setup Go 1.14
+ uses: actions/setup-go@v1
+ with:
+ go-version: 1.14
+ - name: Docker Login
+ run: docker login --username "$DOCKER_USER" --password-stdin <<< "$DOCKER_PASS"
+ - name: Push images with git sha tag
+ env:
+ CTR_TAG: ${{ github.sha }}
+ run: make docker-push
