dotmh - DotMH Publish Actions - 21 #21
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: DotMH Publish Actions | |
run-name: '${{ github.actor }} - ${{ github.workflow }} - ${{ github.run_number }}' | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '**.Dockerfile' | |
- 'devcontainers/**/**.json' | |
- '.github/workflows/**.yml' | |
- '.version' | |
jobs: | |
publish-bases: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: 1.5.0 | |
- name: Build base container | |
run: just build | |
- name: Publish base container | |
run: just action-publish devcontainer ${{ github.actor }} ${{secrets.GITHUB_TOKEN}} | |
- name: Build base cloud container | |
run: just build devcontainer-cloud Cloud.Dockerfile | |
- name: Publish base cloud container | |
run: just action-publish devcontainer-cloud ${{ github.actor }} ${{secrets.GITHUB_TOKEN}} | |
publish-rocky-bases: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: 1.5.0 | |
- name: Build Rocky Linux base | |
run: just build devcontainer-rocky Rocky.Dockerfile | |
- name: Publish Rocky Linux base | |
run: just action-publish devcontainer-rocky ${{ github.actor }} ${{secrets.GITHUB_TOKEN}} | |
- name: Build Rocky Linux Cloud | |
run: just build devcontainer-rocky-cloud Rocky.Cloud.Dockerfile | |
- name: Publish Rocky Linux Cloud | |
run: just action-publish devcontainer-rocky-cloud ${{ github.actor }} ${{secrets.GITHUB_TOKEN}} | |
publishes-dev-containers: | |
runs-on: ubuntu-latest | |
needs: | |
- publish-bases | |
- publish-rocky-bases | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
strategy: | |
matrix: | |
container: | |
- file: Go.Dockerfile | |
container: go | |
- file: Node.Dockerfile | |
container: node | |
base: | |
- devcontainer | |
- devcontainer-cloud | |
- devcontainer-rocky | |
- devcontainer-rocky-cloud | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: 1.5.0 | |
- name: Login into the registry | |
run: just action-login ${{github.actor}} ${{secrets.GITHUB_TOKEN}} | |
- name: Build base container | |
run: just build ${{matrix.base}}-${{matrix.container.container}} ${{matrix.container.file}} ${{matrix.base}} | |
- name: Publish base container | |
run: just action-publish ${{matrix.base}}-${{matrix.container.container}} ${{github.actor}} ${{secrets.GITHUB_TOKEN}} | |
publish-templates: | |
runs-on: ubuntu-latest | |
needs: publishes-dev-containers | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Publish Templates" | |
uses: devcontainers/action@v1 | |
with: | |
publish-templates: "true" | |
base-path-to-templates: "./devcontainers" | |
generate-docs: "true" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |