-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore-oss-changes' into 'main'
feat(OSS): prepare project for OSS publish Closes CN-2372 See merge request cloudnative/go/cidr-allocator!10
- Loading branch information
Showing
12 changed files
with
309 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: build_pr | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
# Any checks that run pre-build | ||
pre-build-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set environment variables | ||
shell: bash | ||
run: | | ||
echo "TAG=${GITHUB_SHA}" >> $GITHUB_ENV | ||
echo "GIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
with: | ||
images: statcan/cidr-allocator | ||
labels: | | ||
org.opencontainers.image.vendor=Statistics Canada | ||
org.opencontainers.image.licenses=https://github.com/StatCan/cidr-allocator/blob/${{ env.GIT_SHA }}/LICENSE | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
tags: statcan/cidr-allocator:${{ env.TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
IMAGE_REPOSITORY=docker.io/library | ||
VERSION=${{ env.TAG }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: build_and_push_master | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
# Any checks that run pre-build | ||
pre-build-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set environment variables | ||
shell: bash | ||
run: | | ||
echo "TAG=${GITHUB_SHA}" >> $GITHUB_ENV | ||
echo "GIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
with: | ||
images: statcan/cidr-allocator | ||
labels: | | ||
org.opencontainers.image.vendor=Statistics Canada | ||
org.opencontainers.image.licenses=https://github.com/StatCan/cidr-allocator/blob/${{ env.GIT_SHA }}/LICENSE | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: statcan/cidr-allocator:${{ env.TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
IMAGE_REPOSITORY=docker.io/library | ||
VERSION=${{ env.TAG }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: build_and_push_tag | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
# Any checks that run pre-build | ||
pre-build-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set environment variables | ||
shell: bash | ||
run: | | ||
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
echo "GIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
with: | ||
images: statcan/cidr-allocator | ||
labels: | | ||
org.opencontainers.image.vendor=Statistics Canada | ||
org.opencontainers.image.licenses=https://github.com/StatCan/cidr-allocator/blob/${{ env.GIT_SHA }}/LICENSE | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: statcan/cidr-allocator:${{ env.TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
IMAGE_REPOSITORY=docker.io/library | ||
VERSION=${{ env.TAG }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
([Français](#code-de-conduite)) | ||
|
||
## Code of Conduct | ||
|
||
Statistics Canada follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). | ||
|
||
Please review before contributing issues, pull requests, or joining the GitHub organization. | ||
|
||
______________________ | ||
|
||
## Code de conduite | ||
|
||
Statistique Canada suit le [Code de conduite de la CNCF](https://github.com/cncf/foundation/blob/main/code-of-conduct-languages/fr.md). | ||
|
||
Veuillez passer en revue avant de contribuer à des problèmes, des demandes d'extraction ou de rejoindre l'organisation GitHub. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.