mirror of
https://github.com/peter-evans/dockerhub-description.git
synced 2024-11-25 13:39:33 +01:00
ci: update default branch
This commit is contained in:
parent
041efd9199
commit
95dee52e1c
4 changed files with 10 additions and 10 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -1,12 +1,12 @@
|
||||||
name: CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
|
@ -76,7 +76,7 @@ jobs:
|
||||||
DOCKERHUB_REPOSITORY: peterevans/dd-ci-fixture-${{ matrix.target }}
|
DOCKERHUB_REPOSITORY: peterevans/dd-ci-fixture-${{ matrix.target }}
|
||||||
|
|
||||||
package:
|
package:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
needs: [test]
|
needs: [test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -91,7 +91,7 @@ jobs:
|
||||||
commit-message: 'build: update distribution'
|
commit-message: 'build: update distribution'
|
||||||
title: Update distribution
|
title: Update distribution
|
||||||
body: |
|
body: |
|
||||||
- Updates the distribution for changes on `master`
|
- Updates the distribution for changes on `main`
|
||||||
|
|
||||||
Auto-generated by [create-pull-request][1]
|
Auto-generated by [create-pull-request][1]
|
||||||
|
|
||||||
|
|
4
.github/workflows/dockerhub-description.yml
vendored
4
.github/workflows/dockerhub-description.yml
vendored
|
@ -3,7 +3,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- README.md
|
- README.md
|
||||||
- .github/workflows/dockerhub-description.yml
|
- .github/workflows/dockerhub-description.yml
|
||||||
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- name: Modify readme for DockerHub
|
- name: Modify readme for DockerHub
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/# Docker Hub Description/# [Docker Hub Description](https:\/\/github.com\/peter-evans\/dockerhub-description)/' README.md
|
sed -i 's/# Docker Hub Description/# [Docker Hub Description](https:\/\/github.com\/peter-evans\/dockerhub-description)/' README.md
|
||||||
sed -i 's/(LICENSE)/(https:\/\/github.com\/peter-evans\/dockerhub-description\/blob\/master\/LICENSE)/' README.md
|
sed -i 's/(LICENSE)/(https:\/\/github.com\/peter-evans\/dockerhub-description\/blob\/main\/LICENSE)/' README.md
|
||||||
|
|
||||||
- name: Docker Hub Description
|
- name: Docker Hub Description
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
4
.github/workflows/publish-docker.yml
vendored
4
.github/workflows/publish-docker.yml
vendored
|
@ -2,7 +2,7 @@ name: Publish Docker Image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
env:
|
env:
|
||||||
|
@ -25,7 +25,7 @@ jobs:
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
# Use Docker `latest` tag convention
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
[ "$VERSION" == "main" ] && VERSION=latest
|
||||||
|
|
||||||
# Build and tag image
|
# Build and tag image
|
||||||
docker build . --file Dockerfile --tag $IMAGE_NAME --label "org.opencontainers.image.version=$VERSION"
|
docker build . --file Dockerfile --tag $IMAGE_NAME --label "org.opencontainers.image.version=$VERSION"
|
||||||
|
|
|
@ -59,14 +59,14 @@ The GitHub repository description can be used for the Docker Hub `short-descript
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
The following workflow updates the Docker Hub repository description whenever there are changes to `README.md` and the workflow file itself on the `master` branch. This workflow assumes its location to be `.github/workflows/dockerhub-description.yml`.
|
The following workflow updates the Docker Hub repository description whenever there are changes to `README.md` and the workflow file itself on the `main` branch. This workflow assumes its location to be `.github/workflows/dockerhub-description.yml`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Update Docker Hub Description
|
name: Update Docker Hub Description
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- README.md
|
- README.md
|
||||||
- .github/workflows/dockerhub-description.yml
|
- .github/workflows/dockerhub-description.yml
|
||||||
|
|
Loading…
Reference in a new issue