mirror of
https://github.com/danog/code-server.git
synced 2024-11-27 04:45:52 +01:00
0155a12500
Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Joe Previte <jjprevite@gmail.com>
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: Publish on Docker
|
|
|
|
on:
|
|
# Shows the manual trigger in GitHub UI
|
|
# helpful as a back-up in case the GitHub Actions Workflow fails
|
|
workflow_dispatch:
|
|
|
|
release:
|
|
types:
|
|
- released
|
|
|
|
# Cancel in-progress runs for pull requests when developers push
|
|
# additional changes, and serialize builds in branches.
|
|
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
docker-images:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Get version
|
|
id: version
|
|
run: echo "::set-output name=version::$(jq -r .version package.json)"
|
|
|
|
- name: Download release artifacts
|
|
uses: robinraju/release-downloader@v1.3
|
|
with:
|
|
repository: "coder/code-server"
|
|
tag: v${{ steps.version.outputs.version }}
|
|
fileName: "*"
|
|
out-file-path: "release-packages"
|
|
|
|
- name: Publish to Docker
|
|
run: yarn publish:docker
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|