update docker login action #24
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: Default | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.x" | |
- name: Run linters | |
run: make check | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.x" | |
- name: Run tests | |
run: make test | |
build: | |
runs-on: ubuntu-latest | |
needs: [check, test] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Github Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Build image and push to Docker Hub and GitHub Container Registry | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
target: gardener-extension-provider-dns-cloudflare | |
context: ./ | |
# Note: tags has to be all lower-case | |
tags: | | |
ghcr.io/schrodit/gardener-extension-provider-dns-cloudflare:latest |