Build & Push Docker image #493
This file contains hidden or 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: "Build & Push Docker image" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| push_docker_image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v6 | |
| - name: "Build and publish a Docker image for ${{ github.repository }}" | |
| uses: macbre/push-to-ghcr@v16 | |
| with: | |
| image_name: ${{ github.repository }} | |
| github_token: ${{ secrets.PAT_TOKEN }} | |
| docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} | |
| docker_io_user: sportclimbing | |
| extra_args: --no-cache | |
| - name: "Update calendar" | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.PAT_TOKEN }} | |
| script: | | |
| await github.rest.actions.createWorkflowDispatch({ | |
| owner: '${{ github.repository_owner }}', | |
| repo: 'ifsc-calendar', | |
| workflow_id: 'update-calendar.yml', | |
| ref: 'main' | |
| }) |