Build `main` Docker images on every push to `main` branch (#272)
This makes it possible to test latest `carton` Docker builds from the `main` branch. * Attempt to push Docker image in `swift.yml` * Update swift.yml * Update swift.yml * Push only a single tag * Use secrets.PAT for GHCR login * Move nightly tags to separate `docker.yml` workflow * Rename `nightly` to `main`
This commit is contained in:
parent
0a28655e5c
commit
b0d53c286a
|
@ -0,0 +1,29 @@
|
|||
name: Build main Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Push Docker image to GitHub Packages
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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.PAT }}
|
||||
|
||||
- name: Push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:main
|
Loading…
Reference in New Issue