ci: fix the HTTP 404 error in the CICD pipeline (#61) #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- "main" | |
- "release-*" | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- id: image_tag | |
run: | | |
BRANCH="${GITHUB_REF#refs/heads/}" | |
if [ "$BRANCH" == 'main' ] ; then | |
echo "tag=latest" >> $GITHUB_OUTPUT | |
else | |
echo "tag=$BRANCH" >> $GITHUB_OUTPUT | |
fi | |
- name: pull existing image for reuse as cache | |
run: | | |
docker pull quay.io/konveyor/move2kube-tests:${{ steps.image_tag.outputs.tag }} || true | |
- name: test | |
run: VERSION='${{ steps.image_tag.outputs.tag }}' make test-docker | |
- run: echo "${{ secrets.QUAY_BOT_PASSWORD }}" | docker login --username "${{ secrets.QUAY_BOT_USERNAME }}" --password-stdin quay.io | |
- name: push image to cache | |
run: docker push quay.io/konveyor/move2kube-tests:${{ steps.image_tag.outputs.tag }} | |
- if: failure() | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_COLOR: "#BD3232" | |
SLACK_ICON: https://github.com/actions.png?size=48 | |
SLACK_MESSAGE: "Test failed in move2kube-tests ${{ github.ref }}" | |
SLACK_TITLE: Failed | |
SLACK_USERNAME: GitHubActions | |
- name: Success Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_ICON: https://github.com/actions.png?size=48 | |
SLACK_MESSAGE: "Test success in move2kube-tests ${{ github.ref }}" | |
SLACK_TITLE: Success | |
SLACK_USERNAME: GitHubActions |