Updated tests to support new action #62
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] | |
jobs: | |
test-remote-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build image and push to registry | |
run: | | |
docker buildx build \ | |
--file ./test/Dockerfile \ | |
--tag ghcr.io/arv1nt3/application:latest \ | |
--push \ | |
./test | |
- name: Test Action with Sample Nginx Application | |
uses: Arv1nt3/kubernetes-deployment-tester-action@main | |
with: | |
image_name: 'ghcr.io/arv1nt3/application:latest' | |
use_local_image: false | |
port: '5000' | |
registry_token: ${{ secrets.GITHUB_TOKEN }} | |
registry_url: ghcr.io | |
registry_username: arv1nt3 | |
command: 'flask' | |
args: 'run,--host=0.0.0.0' | |
env_vars: | | |
- name: APP_KEY | |
value: "YourAppKeyHere" | |
- name: Remove Image from ghcr.io | |
if: success() | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
docker rmi ghcr.io/arv1nt3/application:latest | |
curl -X DELETE -u ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} \ | |
"https://ghcr.io/v2/arv1nt3/application/manifests/latest" | |
test-local-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build image and load locally | |
run: | | |
docker buildx build \ | |
--file ./test/Dockerfile \ | |
--tag ghcr.io/arv1nt3/application:latest \ | |
--load \ | |
./test | |
- name: Test Action with Sample Nginx Application | |
uses: Arv1nt3/kubernetes-deployment-tester-action@main | |
with: | |
image_name: 'ghcr.io/arv1nt3/application:latest' | |
use_local_image: true | |
port: '5000' | |
registry_token: ${{ secrets.GITHUB_TOKEN }} | |
registry_url: ghcr.io | |
registry_username: arv1nt3 | |
command: 'flask' | |
args: 'run,--host=0.0.0.0' | |
env_vars: | | |
- name: APP_KEY | |
value: "YourAppKeyHere" |