diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml new file mode 100644 index 0000000..12f3434 --- /dev/null +++ b/.github/workflows/latest.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6baa68a..d73a466 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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