-
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.
* fortran compiler flag change due to gcc>=10 argument mismatch error. * docker container with github container registry * docker file path change * ci test dependency * ubuntu version latest * back to dockerhub * test without canceling action * ubuntu 18 needs update * remove python2 * unit tests bug fix * optimization ci test
- Loading branch information
1 parent
ce250f8
commit 5a24cd2
Showing
8 changed files
with
109 additions
and
20 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,69 @@ | ||
name: docker-image | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: dreamer2368/magudi/magudi_env | ||
DOCKERPATH: docker | ||
|
||
jobs: | ||
docker-ci: | ||
runs-on: ubuntu-latest | ||
name: "docker env" | ||
env: | ||
DOCKERPATH: docker | ||
steps: | ||
- name: test command | ||
run: echo "docker-ci command" | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- uses: Ana06/[email protected] | ||
id: files | ||
- name: DockerPATH configuration | ||
run: echo "DOCKERPATH=$DOCKERPATH" | ||
- name: DockerPATH - check if files in docker path changed | ||
if: contains(steps.files.outputs.all,env.DOCKERPATH) || contains(steps.files.outputs.all,'docker.yml') | ||
run: | | ||
echo "CI container needs rebuilding..." | ||
echo "CI_NEEDS_REBUILD=true" >> $GITHUB_ENV | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: env.CI_NEEDS_REBUILD | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
if: env.CI_NEEDS_REBUILD | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: type=sha | ||
flavor: latest=true | ||
- name: Build Container motd | ||
if: env.CI_NEEDS_REBUILD | ||
run: | | ||
echo "#!/bin/bash" > ${{env.DOCKERPATH}}/motd.sh | ||
echo "echo --------------------------" >> ${{env.DOCKERPATH}}/motd.sh | ||
echo "echo magudi_env/CI Development Container" >> ${{env.DOCKERPATH}}/motd.sh | ||
echo "echo \"Revision: `echo ${GITHUB_SHA} | cut -c1-8`\"" >> ${{env.DOCKERPATH}}/motd.sh | ||
echo "echo --------------------------" >> ${{env.DOCKERPATH}}/motd.sh | ||
chmod 755 ${{env.DOCKERPATH}}/motd.sh | ||
cat ${{env.DOCKERPATH}}/motd.sh | ||
- name: Docker Image - Build and push | ||
if: env.CI_NEEDS_REBUILD | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
context: ${{ env.DOCKERPATH }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
# platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 |
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
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