Created
October 24, 2023 14:02
-
-
Save hickey/53427e74735a20bf0bef5508ca94855d to your computer and use it in GitHub Desktop.
Docker build action
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: | |
workflow_dispatch: | |
push: | |
jobs: | |
build_docker_image: | |
name: Docker Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Publishing info | |
run: | | |
echo "Pushing docker image: ghcr.io/hickey/supernode:$GITHUB_REF_NAME" | |
echo "Pushing docker image: ghcr.io/hickey/supernode:$GITHUB_SHA" | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Auth to GitHub registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
ghcr.io/${{ github.repository }}:${{ github.sha }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment