Skip to content

refactor(ci): refactor test workflow #89

refactor(ci): refactor test workflow

refactor(ci): refactor test workflow #89

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
alpine-build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3.5.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.6.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Load the Docker image
uses: docker/build-push-action@v4.1.0
with:
context: ./alpine
load: true
push: false
tags: devcontainer-base:test-alpine
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test setup scripts
uses: docker/build-push-action@v4.1.0
with:
build-args: |
BASE_IMAGE=devcontainer-base:test-alpine
context: ./tests/alpine
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
debian-build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3.5.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.6.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Load the Docker image
uses: docker/build-push-action@v4.1.0
with:
context: ./debian
load: true
push: false
tags: devcontainer-base:test-debian
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test setup scripts
uses: docker/build-push-action@v4.1.0
with:
build-args: |
BASE_IMAGE=devcontainer-base:test-debian
context: ./tests/debian
push: false
cache-from: type=gha
cache-to: type=gha,mode=max