This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
Updated readme.md prior to archiving the repo (#241) #74
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish Image | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: CultureHQ/[email protected] | |
- run: yarn | |
- run: yarn build | |
- name: Get Artifact Publish Token | |
id: publish-token | |
uses: atlassian-labs/[email protected] | |
with: | |
output-modes: environment | |
- name: Publish artifact | |
run: | | |
export REPO=atlassianlabs/landkid | |
export TAG=`if [ "${GITHUB_REF##*/}" == "master" ]; then echo "latest"; else echo $GITHUB_REF ; fi` | |
echo "${ARTIFACTORY_API_KEY}" | docker login docker-public.packages.atlassian.com -u "${ARTIFACTORY_USERNAME}" --password-stdin | |
docker build -f Dockerfile -t $REPO:$GITHUB_SHA . | |
docker tag $REPO:$GITHUB_SHA docker-public.packages.atlassian.com/$REPO:$TAG | |
docker tag $REPO:$GITHUB_SHA docker-public.packages.atlassian.com/$REPO:action-${{github.run_number}} | |
docker push docker-public.packages.atlassian.com/$REPO:$TAG | |
docker push docker-public.packages.atlassian.com/$REPO:action-${{github.run_number}} |