how to use github actions to deploy an image that is in tar.gz form

  docker, github-actions, podman, yaml

i had a container that i built into an image, and compressed into a .tar.gz with a different name. so, my image was postgres/db:1 – and i saved it as pga.tar.gz in my respository.

i am trying to use github actions to get it into my digital ocean registry.

it seems like the unzip worked..but i’m getting hung up on the tag:

Run docker tag pga registry.digitalocean.com/abda-containers/abd_db1:77
Error response from daemon: No such image: pga:latest
Error: Process completed with exit code 1.

i’ve tried every combination, and it won’t work…so, i’m thinking maybe it didnt unzip right??

name: unzip and publish to DO

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Image version'
        required: true

jobs:
  build_and_push:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the repo 
        uses: actions/[email protected]
      - name: Unzip image 
        run: tar -zxvf pga.tar.gz
      - name: Install doctl
        uses: digitalocean/[email protected]
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
      - name: Log in to DO Container Registry 
        run: doctl registry login --expiry-seconds 600
      - name: Tag image 
        run:
          docker tag pga/
          registry.digitalocean.com/abda-containers/abd_db1:${{github.event.inputs.version }}
      - name: Push image to DO Container Registry 
        run: docker push registry.digitalocean.com/abda-containers/abd_db1:${{ github.event.inputs.version }}

Source: Docker Questions

LEAVE A COMMENT