Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Commit

Permalink
Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hydazz committed Jan 7, 2021
1 parent d227544 commit e0bec2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/auto-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,15 @@ jobs:
docker build --no-cache --pull . --file Dockerfile --build-arg VERSION="${VERSION}" --build-arg BUILD_DATE="$(date +%Y-%m-%d)" --tag ${DOCKERHUB_USER}/${DOCKERHUB_IMAGE}:cibuild
- name: Get New Package Versions From Image
id: packages
run: |
echo "::set-output name=OLD_MD5::$(md5sum package_versions.txt | awk '{ print $1 }')"
docker run --rm --entrypoint '/bin/sh' -v "$PWD":/tmp ${DOCKERHUB_USER}/${DOCKERHUB_IMAGE}:cibuild -c '\
apk info -v | sort >/tmp/package_versions.txt'
echo "::set-output name=NEW_MD5::$(md5sum package_versions.txt | awk '{ print $1 }')"
- name: Update README.md
env:
AMP_RELEASE: ${{ steps.variables.outputs.VERSION }}
id: readme
run: |
echo "::set-output name=OLD_MD5::$(md5sum README.md | awk '{ print $1 }')"
chmod +x update_version_info.sh && ./update_version_info.sh
echo "::set-output name=NEW_MD5::$(md5sum README.md | awk '{ print $1 }')"
- name: Commit And Push Changes To Github
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/manual-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,15 @@ jobs:
docker build --no-cache --pull . --file Dockerfile --build-arg VERSION="${VERSION}" --build-arg BUILD_DATE="$(date +%Y-%m-%d)" --tag ${DOCKERHUB_USER}/${DOCKERHUB_IMAGE}:cibuild
- name: Get New Package Versions From Image
id: packages
run: |
echo "::set-output name=OLD_MD5::$(md5sum package_versions.txt | awk '{ print $1 }')"
docker run --rm --entrypoint '/bin/sh' -v "$PWD":/tmp ${DOCKERHUB_USER}/${DOCKERHUB_IMAGE}:cibuild -c '\
apk info -v | sort >/tmp/package_versions.txt'
echo "::set-output name=NEW_MD5::$(md5sum package_versions.txt | awk '{ print $1 }')"
- name: Update README.md
env:
AMP_RELEASE: ${{ steps.variables.outputs.VERSION }}
id: readme
run: |
echo "::set-output name=OLD_MD5::$(md5sum README.md | awk '{ print $1 }')"
chmod +x update_version_info.sh && ./update_version_info.sh
echo "::set-output name=NEW_MD5::$(md5sum README.md | awk '{ print $1 }')"
- name: Commit And Push Changes To Github
run: |
Expand Down
6 changes: 3 additions & 3 deletions update_version_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ OLD_OVERLAY_VERSION=$(cat version_info.json | jq -r .overlay_version)
OLD_AMP_RELEASE=$(cat version_info.json | jq -r .amp_version)

sed -i \
-e "s/${OLD_OVERLAY_VERSION}/${OVERLAY_VERSION}/g" \
-e "s/${OLD_AMP_RELEASE}/${AMP_RELEASE}/g" \
README.md
-e "s/${OLD_OVERLAY_VERSION}/${OVERLAY_VERSION}/g" \
-e "s/${OLD_AMP_RELEASE}/${AMP_RELEASE}/g" \
README.md

NEW_VERSION_INFO="overlay_version|amp_version
${OVERLAY_VERSION}|${AMP_RELEASE}"
Expand Down

0 comments on commit e0bec2c

Please sign in to comment.