Also pull the image and add it as an artifact #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker Image | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/ashampoo/imageproxy:latest | |
- name: Save Docker image as a tar archive | |
run: | | |
docker pull ghcr.io/ashampoo/imageproxy:latest | |
docker save -o imageproxy-latest.tar ghcr.io/ashampoo/imageproxy:latest | |
- name: Upload Docker image as an artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docker-image-tar | |
path: imageproxy-latest.tar |