Skip to content

Upgrade to Node 20 (#175) #224

Upgrade to Node 20 (#175)

Upgrade to Node 20 (#175) #224

Workflow file for this run

name: "CI"
on:
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
test-code:
name: Test Code
env:
INTEGRATION_TEST_TOKEN: ${{ secrets.GCR_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16.x
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm test
test-actions-delete-latest-n:
name: Test action delete latest N packages
runs-on: ubuntu-latest
needs: [test-code]
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Dummy Image - 0
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile.dummy
build-args: |
RUN_NUMBER=${{ github.run_number }}-0
tags: |
ghcr.io/${{ github.repository_owner }}/ghcr-delete-image-dummy:untagged
- name: Build and Push Dummy Image - 1
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile.dummy
build-args: |
RUN_NUMBER=${{ github.run_number }}-1
tags: |
ghcr.io/${{ github.repository_owner }}/ghcr-delete-image-dummy:untagged
- name: Build and Push Dummy Image - 2
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile.dummy
build-args: |
RUN_NUMBER=${{ github.run_number }}-2
tags: |
ghcr.io/${{ github.repository_owner }}/ghcr-delete-image-dummy:untagged
- uses: ./
with:
owner: bots-house
name: ghcr-delete-image-dummy
token: ${{ secrets.GCR_TOKEN }}
untagged-keep-latest: 1
test-actions-delete-by-tag:
name: Test action delete by tag
runs-on: ubuntu-latest
needs: [test-code]
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Dummy Image
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile.dummy
tags: |
ghcr.io/${{ github.repository_owner }}/ghcr-delete-image-dummy:${{ github.run_number }}
- uses: ./
with:
owner: bots-house
name: ghcr-delete-image-dummy
token: ${{ secrets.GCR_TOKEN }}
tag: ${{ github.run_number }}