Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/peaceiris/hugo-theme-iris.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeaceiris <30958501+peaceiris@users.noreply.github.com>2022-10-02 10:30:46 +0300
committerpeaceiris <30958501+peaceiris@users.noreply.github.com>2022-10-02 10:30:46 +0300
commit753f6937dbe640f1d02fddc36723c96ddc343c8f (patch)
tree6236d2334f17a4d385facc3e2a7d66978acdaa3f
parente32199bc9ac7a52505b425065842931d7f2888a1 (diff)
ci: remove envs composite action
-rw-r--r--.github/workflows/ci.yml51
-rw-r--r--.github/workflows/release.yml6
-rw-r--r--.github/workflows/scripts/envs/action.yml11
3 files changed, 33 insertions, 35 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5d7e201a..dfe02478 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,26 @@ env:
HUGO_CACHEDIR: /tmp/hugo_cache
jobs:
+ envs:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 1
+ permissions: {}
+ outputs:
+ HUGO_VERSION: ${{ steps.envs.outputs.HUGO_VERSION }}
+ GO_VERSION: ${{ steps.envs.outputs.GO_VERSION }}
+ NODE_VERSION: ${{ steps.envs.outputs.NODE_VERSION }}
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set envs
+ id: envs
+ run: |
+ echo "::set-output name=HUGO_VERSION::$(make get-hugo-version)"
+ echo "::set-output name=GO_VERSION::$(make get-go-version)"
+ echo "::set-output name=NODE_VERSION::$(cat .nvmrc)"
+
deploy:
+ needs: envs
runs-on: ubuntu-22.04
timeout-minutes: 3
permissions:
@@ -32,15 +51,11 @@ jobs:
with:
fetch-depth: 0
- - name: Set envs
- id: envs
- uses: ./.github/workflows/scripts/envs
-
- uses: peaceiris/workflows/setup-hugo@v0.16.0
with:
- node-version: "${{ steps.envs.outputs.NODE_VERSION }}"
- go-version: "${{ steps.envs.outputs.GO_VERSION }}"
- hugo-version: "${{ steps.envs.outputs.HUGO_VERSION }}"
+ node-version: "${{ needs.envs.outputs.NODE_VERSION }}"
+ go-version: "${{ needs.envs.outputs.GO_VERSION }}"
+ hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}"
extended: true
- uses: denoland/setup-deno@v1
@@ -122,6 +137,7 @@ jobs:
user_email: "github-actions[bot]@users.noreply.github.com"
docker:
+ needs: envs
runs-on: ubuntu-20.04
timeout-minutes: 3
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
@@ -130,15 +146,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Set envs
- id: envs
- uses: ./.github/workflows/scripts/envs
-
- uses: peaceiris/workflows/setup-hugo@v0.16.0
with:
- node-version: "${{ steps.envs.outputs.NODE_VERSION }}"
- go-version: "${{ steps.envs.outputs.GO_VERSION }}"
- hugo-version: "${{ steps.envs.outputs.HUGO_VERSION }}"
+ node-version: "${{ needs.envs.outputs.NODE_VERSION }}"
+ go-version: "${{ needs.envs.outputs.GO_VERSION }}"
+ hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}"
extended: true
- name: prepare
@@ -148,6 +160,7 @@ jobs:
- run: make docker-build
setup:
+ needs: envs
runs-on: ubuntu-20.04
timeout-minutes: 3
if: ${{ github.ref == 'refs/heads/main' }}
@@ -156,15 +169,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Set envs
- id: envs
- uses: ./.github/workflows/scripts/envs
-
- uses: peaceiris/workflows/setup-hugo@v0.16.0
with:
- node-version: "${{ steps.envs.outputs.NODE_VERSION }}"
- go-version: "${{ steps.envs.outputs.GO_VERSION }}"
- hugo-version: "${{ steps.envs.outputs.HUGO_VERSION }}"
+ node-version: "${{ needs.envs.outputs.NODE_VERSION }}"
+ go-version: "${{ needs.envs.outputs.GO_VERSION }}"
+ hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}"
extended: true
- uses: peaceiris/workflows/setup-git@v0.16.0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index be6ab68b..099b4b6f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -32,11 +32,11 @@ jobs:
run: |
RELEASE_NOTES="./release_notes.md"
CURRENT_TAG=$(git describe --abbrev=0)
- NEW_VERSION=$(npm_config_yes=true npx semver ${CURRENT_TAG} --increment ${{ github.event.inputs.semver_type }})
+ NEW_VERSION=$(npm_config_yes=true npx semver "${CURRENT_TAG}" --increment ${{ github.event.inputs.semver_type }})
NEW_TAG="v${NEW_VERSION}"
RELEASE_TITLE="Release ${NEW_TAG}"
- git tag -a ${NEW_TAG} -m "${RELEASE_TITLE}"
- git push origin ${NEW_TAG}
+ git tag -a "${NEW_TAG}" -m "${RELEASE_TITLE}"
+ git push origin "${NEW_TAG}"
echo "See [CHANGELOG](https://github.com/${GITHUB_REPOSITORY}/compare/${CURRENT_TAG}...${NEW_TAG}) for more details." > "${RELEASE_NOTES}"
gh release create "${NEW_TAG}" --title "${RELEASE_TITLE}" --notes-file "${RELEASE_NOTES}"
rm "${RELEASE_NOTES}"
diff --git a/.github/workflows/scripts/envs/action.yml b/.github/workflows/scripts/envs/action.yml
deleted file mode 100644
index 7595a4b2..00000000
--- a/.github/workflows/scripts/envs/action.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-name: "Setup Hugo envs"
-description: "A composite action to setup Hugo environments variables"
-runs:
- using: "composite"
- steps:
- - name: Set envs
- shell: bash
- run: |
- echo "::set-output name=HUGO_VERSION::$(make get-hugo-version)"
- echo "::set-output name=GO_VERSION::$(make get-go-version)"
- echo "::set-output name=NODE_VERSION::$(cat .nvmrc)"