generated from degauss-org/degauss_template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* code updates * readme updates * typo * fix 1990 ids
- Loading branch information
1 parent
d44b1b8
commit 39e57fd
Showing
25 changed files
with
843 additions
and
946 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
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,45 @@ | ||
name: build-deploy-pr | ||
on: | ||
pull_request: | ||
jobs: | ||
deploy-images: | ||
runs-on: ubuntu-latest | ||
env: | ||
registry: ghcr.io | ||
username: degauss-org | ||
repository: census_block_group | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: create latest tag variable | ||
run: | | ||
container="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:latest" | ||
echo "container=${container}" >> $GITHUB_ENV | ||
- name: create pull request tag variable based on name of associated branch | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
versioned="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:${GITHUB_HEAD_REF}" | ||
echo "versioned=${versioned}" >> $GITHUB_ENV | ||
- name: build container | ||
run: | | ||
docker build -t ${{ env.container }} . | ||
- name: test run container | ||
run: | | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 2010 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 2000 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1990 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1980 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1970 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} geometry_error.csv 2000 | ||
- name: login to ghcr | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.registry }} | ||
username: ${{ env.username }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: deploy pull request container | ||
run: | | ||
docker tag ${{ env.container }} ${{ env.versioned }} | ||
docker push ${{ env.versioned }} |
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-deploy-release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
deploy-images: | ||
runs-on: ubuntu-latest | ||
env: | ||
registry: ghcr.io | ||
username: degauss-org | ||
repository: census_block_group | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: create latest tag variable | ||
run: | | ||
container="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:latest" | ||
echo "container=${container}" >> $GITHUB_ENV | ||
- name: create release tag variable | ||
if: github.event_name == 'release' | ||
run: | | ||
versioned="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:${GITHUB_REF##*/}" | ||
echo "versioned=${versioned}" >> $GITHUB_ENV | ||
- name: build container | ||
run: | | ||
docker build -t ${{ env.container }} . | ||
- name: test container | ||
run: | | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 2010 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 2000 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1990 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1980 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv 1970 | ||
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} geometry_error.csv 2000 | ||
- name: login to ghcr | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.registry }} | ||
username: ${{ env.username }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: deploy release (and latest) container | ||
run: | | ||
docker tag ${{ env.container }} ${{ env.versioned }} | ||
docker push ${{ env.versioned }} | ||
docker push ${{ env.container }} |
This file was deleted.
Oops, something went wrong.
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.