Skip to content

Lock the bucket when the files upload completes #6

Lock the bucket when the files upload completes

Lock the bucket when the files upload completes #6

Workflow file for this run

name: Docker Build Master
on:
push:
tags:
- 'v*.*.*'
jobs:
prepare_release:
name: Prepare Release
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
prerelease: true
build_deploy:
name: Build and publish app
needs: [ prepare_release ]
runs-on: ubuntu-latest
steps:
- name: Install Node.js and NPM
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Check out Git repository
uses: actions/checkout@v2
- name: Update version in package.json
run: |
npm version ${GITHUB_REF_NAME:1} --allow-same-version --git-tag-version=false
- name: Create bundle
run: scripts/create-bundle.sh
- name: NPM deploy
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}
run: |
cd _releases
mkdir _pkg
cd _pkg
tar xzf ../psitransfer-$GITHUB_REF_NAME.tar.gz --strip 1
npm publish
cd ../..
- name: Add Release artifact
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
fail_on_unmatched_files: false
files: |
_releases/psitransfer-*.tar.gz
publish_release:
name: Publish Release
runs-on: ubuntu-latest
needs: [ build_deploy ]
steps:
- name: Create Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitMode: true
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
body: ${{steps.build_changelog.outputs.changelog}}
build_docker:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: psitrax
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v2
env:
DOCKER_TAG: latest
with:
file: Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
psitrax/psitransfer:${{ github.ref_name }}
ghcr.io/psi-4ward/psitransfer:${{ github.ref_name }}