Skip to content
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

ci: dockerhub #271

Merged
merged 3 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
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
28 changes: 28 additions & 0 deletions .github/workflows/dockerhub_promote_to_latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: dockerhub_promote_to_latest

on:
workflow_dispatch:

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract version for docker tag
- name: Get version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Promote image to latest
run: docker buildx imagetools create -t atsigncompany/sshnpd:latest atsigncompany/sshnpd:release-${{ env.VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub_sshnpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
push: true
provenance: false
tags: |
atsigncompany/sshnpd:latest
atsigncompany/sshnpd:${{ env.VERSION }}
atsigncompany/sshnpd:release-${{ env.VERSION }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
*.hive
*.hash
*.atKeys
# Ignore pubspec.lock
pubspec.lock


# Conventional directory for build output.
build/
Expand Down
Loading