ci: update GitHub Actions workflow branch master → main
Some checks are pending
Multiarch Build Docker CI for the rd13_media_wiki project / build (push) Waiting to run
Some checks are pending
Multiarch Build Docker CI for the rd13_media_wiki project / build (push) Waiting to run
This commit is contained in:
parent
e8bdd13531
commit
c4d8f5bc30
1 changed files with 8 additions and 8 deletions
|
|
@ -2,9 +2,9 @@ name: Multiarch Build Docker CI for the rd13_media_wiki project
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -15,11 +15,11 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # fetch depth 0 is required for nx commands to properly compare code against main branch
|
||||
- name: Create local master branch to use as baseline
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: git branch master origin/master
|
||||
- name: Create local main branch to use as baseline
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: git branch main origin/main
|
||||
- name: install buildx
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/main'
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
# with:
|
||||
# platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.ref == 'refs/heads/master' || github.event.label.name == 'dependencies'
|
||||
if: github.ref == 'refs/heads/main' || github.event.label.name == 'dependencies'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
docker buildx build \
|
||||
--platform linux/amd64 .
|
||||
- name: build and push the image
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag ghcr.io/c-schulz-rd13/rd13_media_wiki:latest \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue