name: Publish nightly snapshot on: schedule: - cron: '0 2 * * *' workflow_dispatch: inputs: skipTests: description: "Flag for skipping the tests. If set to true (without quotation marks), the workflow will skip tests and go straight to releasing the nightly build. Use with caution!" required: false env: MINIKUBE_CPUS_NUMBER: 2 MINIKUBE_MEMORY_AMOUNT: 6144 jobs: publish-image: name: Publish nightly snapshot runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up env vars run: | echo "GO111MODULE=on" >> $GITHUB_ENV echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV echo "MINIKUBE_WANTUPDATENOTIFICATION=false" >> $GITHUB_ENV echo "MINIKUBE_WANTREPORTERRORPROMPT=false" >> $GITHUB_ENV echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env)" >> $GITHUB_ENV echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV echo "GOPATH=/home/runner/go" >> $GITHUB_ENV - name: Prepare go environment uses: actions/setup-go@v2 with: go-version: ${{ env.GO_VERSION }} - name: Ensure Golang runtime dependencies run: make go-dependencies - name: Verify code formatting run: make verify - name: Prepare environment for e2e if: ${{ github.event.inputs.skipTests != 'true' }} run: | sudo apt-get update sudo apt-get install socat sudo mkdir -p $HOME/.kube $HOME/.minikube sudo chown -R $USER $HOME/.kube $HOME/.minikube make minikube-start \ MINIKUBE_DRIVER='docker' \ MEMORY_AMOUNT=${{ env.MINIKUBE_MEMORY_AMOUNT }} \ CPUS_NUMBER=${{ env.MINIKUBE_CPUS_NUMBER }} - name: Jenkins Operator - e2e if: ${{ github.event.inputs.skipTests != 'true' }} run: make e2e E2E_TEST_ARGS='-ginkgo.v' - name: Jenkins Operator - Helm Chart tests if: ${{ github.event.inputs.skipTests != 'true' }} run: | git reset --hard make helm-lint eval $(bin/minikube docker-env) make helm-e2e E2E_TEST_ARGS='-ginkgo.v' - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Release Container Runtime run: | git reset --hard make container-runtime-snapshot-push