Document connect #2
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 Workflow | |
on: | |
push: | |
branches: [ master ] | |
permissions: | |
contents: read | |
jobs: | |
docker-publish: | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Extract Docker Image Name | |
id: image | |
run: | | |
echo "name=ghcr.io/${GITHUB_REPOSITORY,,}:latest" >>${GITHUB_OUTPUT} | |
- name: Log into registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Build | |
run: | | |
docker buildx build \ | |
--no-cache \ | |
--pull \ | |
--tag ${{ steps.image.outputs.name }} \ | |
. | |
- name: Docker Push | |
run: | | |
docker push ${{ steps.image.outputs.name }} | |
if: ${{ github.ref == 'refs/heads/master' }} | |
... |