Skip to content

build(deps): Bump tough-cookie and @azure/ms-rest-js (#8) #51

build(deps): Bump tough-cookie and @azure/ms-rest-js (#8)

build(deps): Bump tough-cookie and @azure/ms-rest-js (#8) #51

Workflow file for this run

# Copyright 2022 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: "build-and-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- run: |
npm install
npm run all
# Update dist files if there is label dependencies or pull request' author is dependabot[bot] (id = 49699333)
- name: Update dist files
if: github.event_name == 'pull_request' && (github.event.pull_request.user.id == 49699333 || contains(github.event.pull_request.labels.*.name, 'dependencies'))
run: |
if [[ -z $(git status -s) ]]
then
echo "No change is required"
else
echo "Updating dist directory"
git config --local user.name "dependabot[bot]"
git config --local user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add --update
git commit --message="Update dist files"
git push
fi
test-create-image-bundle:
needs: [ build ]
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v1.2.4"
- "v1.3.0"
exclude:
- os: windows-latest
version: "v1.2.4"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: ./create-image-bundle/
with:
version: ${{ matrix.version }}
images-file: test/create-image-bundle-images.txt
output-file: test/create-image-bundle-images.tar
- uses: ./create-image-bundle/
with:
version: ${{ matrix.version }}
images-file: test/create-image-bundle-images.txt
output-file: test/create-image-bundle-images-2.tar
test-create-and-push-image-bundle:
needs: [ build ]
strategy:
fail-fast: false
matrix:
version:
- ""
- "latest"
- "v1.2.4"
- "v1.3.0"
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: ./create-image-bundle/
with:
version: ${{ matrix.version }}
images-file: test/create-image-bundle-images.txt
output-file: test/create-image-bundle-images.tar
- name: Start Docker registry
id: start_docker_registry
run: |
echo registry_container_id=$(docker run -d -p 5000:5000 registry:2) >>$GITHUB_OUTPUT
- uses: ./push-image-bundle/
with:
version: ${{ matrix.version }}
image-bundle: test/create-image-bundle-images.tar
to-registry: localhost:5000
to-registry-insecure-skip-tls-verify: true
- name: Stop Docker registry
run: |
docker container rm -fv ${{ steps.start_docker_registry.outputs.registry_container_id }}