Publish #52
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
| on: | |
| push: | |
| branches: [master] | |
| schedule: | |
| - cron: '30 3 * * 2' | |
| name: Publish | |
| jobs: | |
| publish: | |
| name: Publish Docker image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Build Docker image | |
| run: | | |
| docker build \ | |
| --no-cache \ | |
| -t ghcr.io/spaceapi/website:latest \ | |
| -t ghcr.io/spaceapi/website:v3 \ | |
| -t ghcr.io/spaceapi/website:master \ | |
| --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \ | |
| . | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push Docker image | |
| run: | | |
| docker push -a ghcr.io/spaceapi/website |