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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -15,11 +15,11 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # fetch depth 0 is required for nx commands to properly compare code against main branch
|
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
|
- name: Create local main branch to use as baseline
|
||||||
if: github.ref != 'refs/heads/master'
|
if: github.ref != 'refs/heads/main'
|
||||||
run: git branch master origin/master
|
run: git branch main origin/main
|
||||||
- name: install buildx
|
- name: install buildx
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main'
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
# with:
|
# with:
|
||||||
# platforms: linux/amd64,linux/arm/v7,linux/arm64
|
# platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
- name: Login to GitHub Container Registry
|
- 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
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64 .
|
--platform linux/amd64 .
|
||||||
- name: build and push the image
|
- name: build and push the image
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main'
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --push \
|
docker buildx build --push \
|
||||||
--tag ghcr.io/c-schulz-rd13/rd13_media_wiki:latest \
|
--tag ghcr.io/c-schulz-rd13/rd13_media_wiki:latest \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue