chore(deps): update actions/github-script action to v7 #100
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 Action | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
jobs: | |
test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Docker testing | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver: docker | |
- name: Log in to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.PAT }} | |
- name: Build version | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ghcr.io/usa-reddragon/kiri-ci:${{ github.sha }} | |
- name: Modify action.yml to use local image | |
run: | | |
sed -i "s#ghcr.io/usa-reddragon/kiri:__KIRI_VERSION__#ghcr.io/usa-reddragon/kiri-ci:${{ github.sha }}#g" action.yml | |
# Action testing | |
- name: Clone SnekSafe for testing | |
uses: actions/checkout@v3 | |
with: | |
repository: USA-RedDragon/SnekSafe | |
path: SnekSafe | |
- name: Test Local Action | |
uses: ./ | |
with: | |
project-file: SnekSafe/kicad/sneksafe.kicad_pro | |
output-dir: SnekSafe/kicad/.kiri | |
- name: Ensure output directory was created | |
run: | | |
ls -l SnekSafe/kicad/.kiri | |
- name: Ensure output files were created | |
run: | | |
ls -l SnekSafe/kicad/.kiri/web/index.html | |
- name: Delete ci image from GHCR | |
if: always() | |
run: | | |
curl -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/USA-RedDragon/kiri-ci/packages/container/kiri-ci/versions/${{ github.sha }} |