-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from USDA-ARS-GBRU/dockerpatch
updated the Docker and Github container registry deploy action.
- Loading branch information
Showing
3 changed files
with
42 additions
and
45 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 |
---|---|---|
@@ -1,44 +1,41 @@ | ||
name: Publish Docker image | ||
name: Publish Docker images | ||
|
||
on: | ||
release: | ||
branches: main | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build-and-push-image: | ||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get short SHA | ||
id: slug | ||
run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)" | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.MY_GITHUB_RESISTRY_TOKEN }} | ||
|
||
- name: Build AVX container image and push to ghcr | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: docker-images/avx | ||
push: true | ||
tags: ghcr.io/usda-ars-gbru/guidemaker-avx:sha-${{ steps.slug.outputs.sha12 }} | ||
|
||
- name: Build NON-AVX container image and push to ghcr | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: docker-images/nonavx | ||
push: true | ||
tags: ghcr.io/usda-ars-gbru/guidemaker-nonavx:sha-${{ steps.slug.outputs.sha12 }} | ||
|
||
- name: Build WEBAPP container image and push to ghcr | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: docker-images/webapp | ||
push: true | ||
tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }} | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Github Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get short SHA | ||
id: slug | ||
run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)" | ||
- | ||
name: Build and push AVX version of guidemaker | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: docker-images/webapp | ||
push: true | ||
tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }} | ||
- | ||
name: Build and push noavx version of guidemaker | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: docker-images/noavx | ||
push: true | ||
tags: ghcr.io/usda-ars-gbru/guidemaker-noavx:sha-${{ steps.slug.outputs.sha12 }} |
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