Skip to content

Upgrade to v2 of the Docker GitHub action #784

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

Merged
merged 5 commits into from
Nov 14, 2020
Merged
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
26 changes: 18 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
name: docker

on:
push:
branches:
- master

jobs:

docker:
name: push kjconroy/sqlc:devel
runs-on: ubuntu-latest
steps:
- name: Set created date
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- uses: actions/checkout@v2
- uses: docker/build-push-action@v2.1.0
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: kjconroy
password: ${{ secrets.DOCKER_PASSWORD }}
build_args: github_ref=${{ github.ref }},github_sha=${{ github.sha }}
repository: kjconroy/sqlc
add_git_labels: true
tags: devel
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
build-args: |
github_ref=${{ github.ref }}
github_sha=${{ github.sha }}
tags: kjconroy/sqlc:devel
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}