GitHub CI #36
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: GitHub CI | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 0 * * 0 | |
env: | |
REGISTRY: ghcr.io | |
BASHBREW_NAMESPACE: ghcr.io/lingmoos-testing | |
defaults: | |
run: | |
shell: 'bash -Eeuo pipefail -x {0}' | |
jobs: | |
build: | |
name: Build Docker | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get bashbrew | |
run: | | |
git clone https://github.com/docker-library/bashbrew.git bashbrew | |
chmod +x bashbrew/bashbrew.sh | |
./bashbrew/bashbrew.sh build ./library/lingmo | |
- name: List Built Images | |
run: docker images | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to registry | |
run: | | |
./bashbrew/bashbrew.sh push --target-namespace $BASHBREW_NAMESPACE ./library/lingmo | |