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

Commit

Permalink
chore(workflow): release - checkout tag
Browse files Browse the repository at this point in the history
  • Loading branch information
JAdshead committed Apr 29, 2022
1 parent 5ba844d commit ce9cfbd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
name: Docker Tag Version Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
id: set_tag_version
run: |
Expand All @@ -37,6 +36,9 @@ jobs:
echo "::error::Incorrect tag provided, please provide a tag with the correct format and try again"
exit 1
fi
- uses: actions/checkout@v2
with:
ref: "${{ steps.set_tag_version.outputs.tagversion}}"
- name: Docker tag version
id: set_docker_tag_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "v${{ github.event.inputs.docker_tag_version }}"
- name: Docker login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
- name: Build production docker image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "v${{ github.event.inputs.docker_tag_version }}"
- name: Docker Image Versions
id: set_docker_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ jobs:
name: One App Statics Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Docker login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
- name: Tag Version
id: set_tag_version
run: |
Expand All @@ -29,6 +21,16 @@ jobs:
else
echo ::set-output name=tagversion::${{ github.event.inputs.tag_version }}
fi
- uses: actions/checkout@v2
with:
ref: "${{ steps.set_tag_version.outputs.tagversion}}"
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Docker login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
- name: Extract and zip production statics
run: |
docker create --name prod ${{ secrets.DOCKER_USER }}/one-app:${{ steps.set_tag_version.outputs.tagversion}}
Expand Down

0 comments on commit ce9cfbd

Please sign in to comment.