2021-07-29 23:31:46 +05:30
|
|
|
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:
|
2022-02-10 17:40:41 -08:00
|
|
|
types:
|
|
|
|
- released
|
2021-07-29 23:31:46 +05:30
|
|
|
|
2022-03-01 15:03:39 -08:00
|
|
|
# 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' }}
|
|
|
|
|
2021-07-29 23:31:46 +05:30
|
|
|
jobs:
|
|
|
|
docker-images:
|
2022-02-10 17:40:41 -08:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-29 23:31:46 +05:30
|
|
|
steps:
|
2022-02-10 17:40:41 -08:00
|
|
|
- name: Checkout
|
2022-03-01 16:31:32 -07:00
|
|
|
uses: actions/checkout@v3
|
2021-07-29 23:31:46 +05:30
|
|
|
|
|
|
|
- name: Set up QEMU
|
2022-05-10 20:35:25 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2021-07-29 23:31:46 +05:30
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2022-05-10 13:13:45 -07:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2021-07-29 23:31:46 +05:30
|
|
|
|
2022-02-10 17:40:41 -08:00
|
|
|
- name: Login to Docker Hub
|
2022-05-10 12:37:05 -07:00
|
|
|
uses: docker/login-action@v2
|
2022-02-10 17:40:41 -08:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
2022-05-10 17:11:06 -04:00
|
|
|
- name: Login to GHCR
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-03-17 11:52:39 -07:00
|
|
|
- name: Get version
|
|
|
|
id: version
|
2022-03-22 16:45:59 -07:00
|
|
|
run: echo "::set-output name=version::$(jq -r .version package.json)"
|
2022-03-17 11:52:39 -07:00
|
|
|
|
2022-04-14 17:02:03 -07:00
|
|
|
- name: Download release artifacts
|
|
|
|
uses: robinraju/release-downloader@v1.3
|
2022-03-17 11:52:39 -07:00
|
|
|
with:
|
2022-04-14 17:02:03 -07:00
|
|
|
repository: "coder/code-server"
|
|
|
|
tag: v${{ steps.version.outputs.version }}
|
2022-05-06 16:57:22 -05:00
|
|
|
fileName: "*"
|
2022-04-14 17:02:03 -07:00
|
|
|
out-file-path: "release-packages"
|
|
|
|
|
|
|
|
- name: Publish to Docker
|
|
|
|
run: yarn publish:docker
|
2021-07-29 23:31:46 +05:30
|
|
|
env:
|
2022-02-10 17:40:41 -08:00
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|