Skip to content

Commit

Permalink
Merge pull request #36 from cisagov/bugfix/correct-missed-3.8
Browse files Browse the repository at this point in the history
Use Python 3.9 instead of 3.8
  • Loading branch information
jsf9k authored Oct 13, 2020
2 parents c5aba87 + 7d59f7e commit 8fa63f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,20 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Determine image version
id: get_ver
run: |
echo "##[set-output name=version;]$(./bump_version.sh show)"
run: echo IMAGE_VERSION=$(./bump_version.sh show) >> $GITHUB_ENV
- name: Build docker image
run: |
version=$(./bump_version.sh show)
version=${{ env.IMAGE_VERSION }}
docker build \
--tag "$IMAGE_NAME" \
--build-arg GIT_COMMIT=$(git log -1 --format=%H) \
--build-arg GIT_REMOTE=$(git remote get-url origin) \
--build-arg VERSION=${{ steps.get_ver.outputs.version }} \
--build-arg VERSION=${{ env.IMAGE_VERSION }} \
.
- name: Save docker image artifact
run: |
mkdir dist
version=$(./bump_version.sh show)
version=${{ env.IMAGE_VERSION }}
docker save $IMAGE_NAME:latest | gzip > dist/image.tar.gz
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,35 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Determine image version
id: get_ver
run: |
echo "##[set-output name=version;]$(./bump_version.sh show)"
run: echo IMAGE_VERSION=$(./bump_version.sh show) >> $GITHUB_ENV
- name: Build Docker image
run: |
version=${{ env.IMAGE_VERSION }}
docker build \
--tag "$IMAGE_NAME" \
--build-arg GIT_COMMIT=$(git log -1 --format=%H) \
--build-arg GIT_REMOTE=$(git remote get-url origin) \
--build-arg VERSION=${{ steps.get_ver.outputs.version }} \
--build-arg VERSION=${{ env.IMAGE_VERSION }} \
.
- name: Tag Docker image
run: |
IFS='.' read -r -a version_array \
<<< "${{ steps.get_ver.outputs.version }}"
<<< "${{ env.IMAGE_VERSION }}"
docker login --username "$DOCKER_USER" --password "$DOCKER_PW"
docker tag "$IMAGE_NAME" "${IMAGE_NAME}:latest"
docker tag "$IMAGE_NAME" \
"${IMAGE_NAME}:${{ steps.get_ver.outputs.version }}"
"${IMAGE_NAME}:${{ env.IMAGE_VERSION }}"
docker tag "$IMAGE_NAME" \
"${IMAGE_NAME}:${version_array[0]}.${version_array[1]}"
docker tag "$IMAGE_NAME" "${IMAGE_NAME}:${version_array[0]}"
- name: Publish image to Docker Hub
run: |
IFS='.' read -r -a version_array \
<<< "${{ steps.get_ver.outputs.version }}"
<<< "${{ env.IMAGE_VERSION }}"
docker push "${IMAGE_NAME}:latest"
docker push "${IMAGE_NAME}:${{ steps.get_ver.outputs.version }}"
docker push "${IMAGE_NAME}:${{ env.IMAGE_VERSION }}"
docker push "${IMAGE_NAME}:${version_array[0]}.${version_array[1]}"
docker push "${IMAGE_NAME}:${version_array[0]}"
- name: Publish README.md to Docker Hub
Expand Down

0 comments on commit 8fa63f6

Please sign in to comment.