1234567891011121314151617181920212223242526272829303132333435363738394041 |
- name: CD Docker
- on:
- workflow_dispatch:
- workflow_run:
- workflows: ["CI Dependencies"]
- branches:
- - main
- types:
- - completed
- jobs:
- docker:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - uses: actions/setup-python@v2
- with:
- python-version: "3.x"
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - run: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- - name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- platforms: linux/amd64
- push: true
- tags: |
- ghcr.io/${{ env.IMAGE_REPOSITORY }}:main
|