Make always_pull_images optional #23
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: "CI" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: cargo test | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-24.04-arm] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo test --all-features | |
formatting: | |
name: cargo fmt | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check | |
uses: actions-rust-lang/rustfmt@v1 | |
clippy: | |
name: cargo clippy | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
- name: Clippy Check | |
run: cargo clippy --all-features -- -D warnings | |
container: | |
name: Build and publish containers | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-24.04-arm] | |
container: | |
[ | |
{ name: "app-controller", path: "." }, | |
{ name: "x11-host", path: "containers/x11-host" }, | |
{ name: "firefox-demo", path: "containers/firefox-demo" }, | |
] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.ref == 'refs/heads/main' }} | |
tags: ghcr.io/twizmwazin/app-controller/${{ matrix.container.name }} | |
context: ${{ matrix.container.path }} | |
file: ${{ matrix.container.path }}/Containerfile |