Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workflow for promoting 'latest' docker tag #93

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: promote-latest

on:
workflow_dispatch:
inputs:
tag:
description: "The tag to point latest to"
required: true

permissions:
actions: read
checks: none
contents: write
deployments: none
issues: none
packages: write
pull-requests: none
repository-projects: none
security-events: none
statuses: none

jobs:
manifest:
runs-on: ubuntu-22.04
needs: release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}
- name: Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Manifest
run: |
docker manifest create ghcr.io/coder/envbox:latest \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.tag }}-amd64 \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.tag }}-arm64

- name: Push Manifest
run: |
docker manifest push ghcr.io/coder/envbox:latest
5 changes: 0 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ jobs:
docker manifest create ghcr.io/coder/envbox:${{ github.event.inputs.version }} \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-amd64 \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-arm64
docker manifest create ghcr.io/coder/envbox:latest \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-amd64 \
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-arm64

- name: Push Manifest
run: |
docker manifest push ghcr.io/coder/envbox:${{ github.event.inputs.version }}
docker manifest push ghcr.io/coder/envbox:latest

tag:
runs-on: ubuntu-22.04
Expand Down
Loading