Bump the docker group in /cmd/kobs with 2 updates (#639) #486
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: Continuous Delivery | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set Docker Tag | |
id: tag | |
run: | | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
echo TAG=${GITHUB_REF:10} >> $GITHUB_ENV | |
else | |
echo TAG=main >> $GITHUB_ENV | |
fi | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
- name: Build and Push Docker Image | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: . | |
file: ./cmd/kobs/Dockerfile | |
platforms: linux/amd64,linux/arm64/v8 | |
tags: ghcr.io/${{ github.repository_owner }}/kobs:${{ env.TAG }} | |
documentation: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Set Aliases | |
id: aliases | |
run: | | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
MIKE_ALIASES="${GITHUB_REF:10}" | |
else | |
MIKE_ALIASES="main latest" | |
fi | |
echo ::set-output name=aliases::${MIKE_ALIASES} | |
- name: Install Material for MkDocs | |
run: pip install -Iv mkdocs-material==9.5.7 | |
- name: Install PyMdown Extensions | |
run: pip install -Iv pymdown-extensions==10.7 | |
- name: Install mike | |
run: pip install -Iv mike==2.0.0 | |
- name: Prepare Deployment | |
run: | | |
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git remote rm origin | |
git remote add origin "${remote_repo}" | |
- name: Deploy to GitHub Pages | |
run: | | |
git fetch origin gh-pages --verbose | |
mike deploy --push --update-aliases ${{ steps.aliases.outputs.aliases }} | |
mike set-default --push latest |